HTML Diff
0 added 0 removed
Original 2026-01-01
Modified 2026-03-09
1 <p>We are already processing the three properties from the loaded data. We need to process the fourth one: isAvailable. This property stores a Boolean value that describes product availability. If the product is in stock, then the property contains true, otherwise it contains false.</p>
1 <p>We are already processing the three properties from the loaded data. We need to process the fourth one: isAvailable. This property stores a Boolean value that describes product availability. If the product is in stock, then the property contains true, otherwise it contains false.</p>
2 <p>Depending on the presence or absence of the product, the card must have one of the two additional classes: product--available or product--unavailable.</p>
2 <p>Depending on the presence or absence of the product, the card must have one of the two additional classes: product--available or product--unavailable.</p>
3 <p><a>You have already solved</a>this task, and that’s why you need to repeat the same steps by analogy with the first program. Here is a brief summary:</p>
3 <p><a>You have already solved</a>this task, and that’s why you need to repeat the same steps by analogy with the first program. Here is a brief summary:</p>
4 <ol><li>set the variable to store the class name and write the default value into it;</li>
4 <ol><li>set the variable to store the class name and write the default value into it;</li>
5 <li>set up a check to see if the product is available;</li>
5 <li>set up a check to see if the product is available;</li>
6 <li>if the check fails, change the value in the variable;</li>
6 <li>if the check fails, change the value in the variable;</li>
7 <li>after the check, add the class of the variable to the product card.</li>
7 <li>after the check, add the class of the variable to the product card.</li>
8 </ol><p>After the function is completed, you need to test it. To do this, change the value of the isAvailable property in the data object to false. If everything is done correctly, the appearance of the card will change.</p>
8 </ol><p>After the function is completed, you need to test it. To do this, change the value of the isAvailable property in the data object to false. If everything is done correctly, the appearance of the card will change.</p>