Script Valley
JavaScript Tutorial for Beginners to Advanced
ES6+ Modern JavaScript Features/Assessment

Practice & Assessment

Test your understanding of ES6+ Modern JavaScript Features

Multiple Choice Questions

5
1

What does the spread operator (...) do when used with an array?

2

How many default exports can a JavaScript module have?

3

What does the 'extends' keyword do in a JavaScript class?

4

Which of the following correctly uses object destructuring in a function parameter?

5

What is the difference between rest parameters and the spread operator?

Coding Challenges

1
1

Build a Modular Utility Library

Create two JavaScript module files. In utils.js, export named functions: formatCurrency(amount), capitalise(str), and clamp(value, min, max). In app.js, import all three and demonstrate each with at least two test cases per function. Use destructuring, template literals, and default parameter values throughout.

Medium
GeeksForGeeks

Mini Project

1

Object-Oriented Task Manager with Classes

Build a Task Manager using ES6 classes. Create a Task class with properties: id, title, description, priority ('low', 'medium', 'high'), and completed (default false). Add methods: complete(), toString(). Create a TaskManager class that holds an array of tasks with methods: addTask(taskData), removeTask(id), filterByPriority(level), and getStats() (returns total, completed, pending counts). Build a simple HTML interface that uses these classes and displays tasks dynamically. Use destructuring, spread, and template literals throughout.

Hard
Practice & Assessment โ€” ES6+ Modern JavaScript Features โ€” JavaScript Tutorial for Beginners to Advanced โ€” Script Valley โ€” Script Valley