Script Valley
JavaScript Tutorial for Beginners to Advanced
Arrays and Objects/Assessment

Practice & Assessment

Test your understanding of Arrays and Objects

Multiple Choice Questions

5
1

What does the Array.map() method return?

2

What is the output of [1,2,3].reduce((acc, n) => acc + n, 0)?

3

How do you access a property called 'user-name' from an object?

4

What does Object.entries() return?

5

Which method finds the first element in an array that matches a condition?

Coding Challenges

1
1

Product 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.

Medium
GeeksForGeeks

Mini Project

1

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.

Medium
Practice & Assessment โ€” Arrays and Objects โ€” JavaScript Tutorial for Beginners to Advanced โ€” Script Valley โ€” Script Valley