Practice & Assessment
Test your understanding of Arrays and Objects
Multiple Choice Questions
5What does the Array.map() method return?
What is the output of [1,2,3].reduce((acc, n) => acc + n, 0)?
How do you access a property called 'user-name' from an object?
What does Object.entries() return?
Which method finds the first element in an array that matches a condition?
Coding Challenges
1Product Catalogue Filter and Sort
Given an array of product objects (each with name, price, and category), write functions to: (1) filter products by category, (2) sort by price ascending, (3) calculate the total price of all filtered products. Display the results using console.log.
Mini Project
Contact Book Application
Build a contact book in the browser. Store contacts as an array of objects (name, email, phone). Add functions to: add a contact, delete by name, search by name (returns partial matches), and display all contacts. Build a simple HTML interface with input fields and buttons. Render the contact list as an HTML table that updates every time you add or delete. Use array methods throughout.
