
Engage in hands-on learning of JavaScript and ES6 through progressively challenging exercises on arrays, object destructuring, arrow functions, template literals, immediately invoked function expressions, global hoisting, and classes.
Master course navigation with lecture decks, diagrams, and practice videos; tackle two-video challenges with task and solution demonstrations; use video player controls for speed and quality in full hd.
Please download exercise files attached to this lesson
Create a function that sums any number of arguments and logs the result with console.log, then verify by calling it with 2, 3, and 6 arguments.
Declare a sum function that accepts any number of arguments using the rest operator, then compute the total with reduce and console log the result.
Tackle a JavaScript const challenge by answering questions and adjusting code to resolve the error after line 19, mastering constants in ES6.
Explore how const behaves with arrays: you can mutate a const array (push, delete) because of reference types, but you cannot reassign the constant; use var or let for reassignment.
This challenge demonstrates global versus block scope with var and let in a for loop, showing how let confines i to the loop and yields 0–4 inside and 10 outside.
Challenge 4 on hoisting by fixing a reference error caused by a variable C being scoped inside an if statement, ensuring C is defined appropriately outside.
Explore hoisting and scope in JavaScript via let vs var, showing that C defined with let inside a block is not accessible globally, causing a reference error.
Replace the if-else with a ternary operator in the is number function, returning the number for numeric inputs; otherwise, that's not a number, with tests for numbers, strings, and booleans.
Master the ternary operator as a one-line alternative to if-else, using a condition to return 3 or not a number in type checks.
Master arrow functions in JavaScript by transforming callbacks and delayed executions with concise, setTimeout-based patterns, as illustrated in challenge 6 of the ES6 challenges.
Rewrite anonymous functions as arrow functions, using fat arrow syntax with empty parentheses for no parameters. Demonstrate setTimeout callbacks, implicit return for single statements, and logging results to the console.
Learn how to use default parameters in JavaScript to set the second argument to 2 in a multiply function. See how this handles defined and undefined inputs.
Explore how missing parameters affect JavaScript functions and how to use default parameters to handle calls without arguments, including a square function that throws when no argument is provided.
Practice object destructuring by extracting x, y, z from an object in a function parameter. Return x times y times z, and compare a simpler parameter destructuring approach.
Practice array destructuring and rest operator by assigning elements to a, b, and c, and log the results, with c as an array from 3 to 7.
Apply destructuring with a left side array and the rest operator to assign remaining elements to an array. The example demonstrates swapping A and B and validating results in console.
Master the spread operator to combine arrays a, b, and c with a number d into a new array and log the result to the console.
Explore how the spread operator turns iterables like strings and arrays into separate elements, construct new arrays with multiple spreads, and compare it to the rest operator.
Learn how to copy an array of three elements and add a new element, practicing array manipulation in JavaScript while ensuring console.log outputs match the expected results.
Copy arrays by assignment shows that arrays are reference types, so A and B share data; use slice or spread for shallow copies, and JSON.stringify/parse for deep copies.
Master template literals in JavaScript by processing an array of cars with brand and price, labeling cheap when price is less than or equal to 20000, otherwise expensive.
Iterate an array of car objects and generate a template literal showing brand and price with currency. Apply a simple conditional (ternary) to label each car as cheap or expensive.
Master object destructuring inside a short person function by renaming fields, pulling a nested country value, and supplying a default for missing fields, then return a simplified object using shorthand.
Iterate over a string to count lowercase vowels within an input array of labels, returning the total vowel count for the given string.
Practice swapping two variables using only those two, so that a becomes the second value and b becomes the first, then log the results to the console.
Swap values of two variables in JavaScript using destructuring by mapping a two-element array to B and A, then run the terminal to verify the solution.
This lecture introduces immediately invoked function expressions (IIFE) and how to convert function declarations to function expressions and arrow functions, expose internal methods, and use closures to manage private state.
Explore challenge 18 on classes, using es6 features to create and access objects named apple and orange, and implement a function with a lock to mute console output.
Compare function constructors and prototypes by building apple and orange fruits with a price info method. Then convert to class syntax that combines constructor and prototype methods.
Learn to iterate over an object using for-in, access fields with square bracket syntax, sum numeric values, and filter to own properties to avoid prototype pollution, yielding 42.
Apply the reduce method to sum positive and negative numbers, building an object with plus and minus fields using an arrow function and accumulator.
In this course, you will dive into exciting JavaScript challenges designed to sharpen your problem-solving skills and deepen your understanding of core JavaScript concepts. Each challenge consists of a task and solution, where you will either fix existing code or write additional logic.
I will walk you through every line of the solution, explaining how JavaScript works behind the scenes. By the end of the course, you won’t just memorize syntax—you’ll think like a JavaScript developer.
Topics covered:
• Destructuring – Efficiently extract values from arrays and objects.
• Array helper methods – Master map(), filter(), reduce(), and more.
• Variable hoisting – Understand how JavaScript moves declarations.
• Let, Var, and Const – Learn which one to use and when.
• Rest and Spread Operators – Simplify array and object manipulations.
• Ternary Operator – Write cleaner, more concise conditionals.
• Default parameters – Handle function arguments effectively.
• Closures – Unlock the power of function scope.
• IIFE (Immediately Invoked Function Expressions) – Execute code instantly.
• Classes – Leverage modern JavaScript object-oriented programming.
At the start of the course, you’ll get source files for all challenges, including both the starting point and final solutions. Simply open the “start” folder, begin coding, and follow along as I guide you through real-world scenarios.
By the end of this course, you will be confident in solving JavaScript challenges, writing clean and efficient code, and applying these concepts in real projects.