Skip to content
📜

JavaScript Basics

18 exercises

Learn JavaScript from the beginning — variables, functions, arrays, objects, DOM, and async.

  1. 1

    Let vs Const Quiz

    Test your understanding of what happens when you reassign a const variable in JavaScript.

    Multiple ChoiceEasy
  2. 2

    Predict Variable Reassignment

    Predict the output of a JavaScript program that reassigns a let variable.

    Predict OutputBeginner
  3. 3

    Declare a JavaScript Constant

    Practice using the const keyword to declare a constant variable in JavaScript.

    Fill in the BlankBeginner
  4. 4

    JavaScript Primitive Types

    Check your understanding of which types are primitives in JavaScript.

    Concept CheckMedium
  5. 5

    Find the Arrow Function Error

    Spot a common syntax error in a JavaScript arrow function declaration.

    Find the MistakeEasy
  6. 6

    Predict the Function Call Result

    Predict the output of a simple JavaScript function call with a numeric argument.

    Predict OutputBeginner
  7. 7

    JavaScript Array length Quiz

    Test your understanding of the length property on a JavaScript array.

    Multiple ChoiceBeginner
  8. 8

    Predict Array push Output

    Predict the new length of a JavaScript array after calling push.

    Predict OutputBeginner
  9. 9

    JavaScript Object Keys Quiz

    Test your understanding of how object keys work in JavaScript.

    Multiple ChoiceBeginner
  10. 10

    Predict Object Property Access

    Predict the value returned by accessing a property on a JavaScript object.

    Predict OutputBeginner
  11. 11

    Predict JavaScript if/else Output

    Predict the output of a JavaScript if/else statement with a comparison.

    Predict OutputBeginner
  12. 12

    Complete the if Condition

    Fill in the blank to make the if condition true when temperature is above 30.

    Fill in the BlankBeginner
  13. 13

    Predict JavaScript while Loop Output

    Predict the output of a JavaScript while loop that counts down.

    Predict OutputBeginner
  14. 14

    Spot the Infinite Loop

    Identify a common mistake that causes a JavaScript while loop to run forever.

    Find the MistakeEasy
  15. 15

    What Is the DOM?

    Check your conceptual understanding of what the DOM is in web development.

    Concept CheckMedium
  16. 16

    querySelector Quiz

    Test your knowledge of the querySelector method for selecting DOM elements.

    Multiple ChoiceMedium
  17. 17

    What Is a Promise?

    Check your conceptual understanding of what a Promise is in JavaScript.

    Concept CheckMedium
  18. 18

    async/await Keyword Quiz

    Test your knowledge of the async and await keywords in modern JavaScript.

    Multiple ChoiceMedium

Build real projects

Apply what you learned by building guided projects with starter code and solutions.

View projects