Contenido del Curso
JavaScript Data Structures
1. Introduction and Prerequisites
2. Objects Fundamentals
Understanding ObjectsObject CreationNested PropertiesChallenge: Creating an ObjectAccessing Object PropertiesChallenge: Accessing Object PropertiesWorking with PropertiesChallenge: Modifying and Extending ObjectObject MethodsProperties in MethodsChallenge: Working with Object MethodsObject Fundamentals Sum Up
3. Advanced Object Manipulation
JavaScript Data Structures
Challenge: Discovering Featured Products
Task
- The original array is given as
products
, containing objects representing products with propertiesname
,price
, andfeatured
. - Use the
find()
method to discover the first product in the array with thefeatured
property set totrue
. - If a featured product is found, log its name and price; otherwise, log a message indicating that no featured product was found.
Expected output:
- Use the
find()
method on theproducts
array and provide a callback function that checks if thefeatured
property of the product object istrue
. - If a featured product is found, log its name and price; otherwise, log a message indicating that no featured product was found.
¿Todo estuvo claro?
Sección 5. Capítulo 6
Contenido del Curso
JavaScript Data Structures
1. Introduction and Prerequisites
2. Objects Fundamentals
Understanding ObjectsObject CreationNested PropertiesChallenge: Creating an ObjectAccessing Object PropertiesChallenge: Accessing Object PropertiesWorking with PropertiesChallenge: Modifying and Extending ObjectObject MethodsProperties in MethodsChallenge: Working with Object MethodsObject Fundamentals Sum Up
3. Advanced Object Manipulation
JavaScript Data Structures
Challenge: Discovering Featured Products
Task
- The original array is given as
products
, containing objects representing products with propertiesname
,price
, andfeatured
. - Use the
find()
method to discover the first product in the array with thefeatured
property set totrue
. - If a featured product is found, log its name and price; otherwise, log a message indicating that no featured product was found.
Expected output:
- Use the
find()
method on theproducts
array and provide a callback function that checks if thefeatured
property of the product object istrue
. - If a featured product is found, log its name and price; otherwise, log a message indicating that no featured product was found.
¿Todo estuvo claro?
Sección 5. Capítulo 6