JavaScript Exercises
Exercises
Test your JavaScript skills with exercises from all categories:
Introduction
Where To
Output
Statements
Syntax
Comments
Variables
Let
Const
Operators
Arithmetic Operators
Assignment Operators
Data Types
Functions
Objects
Object Properties
Object Methods
Display Objects
Object Constructors
Events
Strings
String Methods
String Search
String Templates
Numbers
BigInt
Number Methods
Number Properties
Arrays
Array Methods
Array Search
Sorting Arrays
Array iteration
Array Const
Dates
Date Formats
Date Get Methods
Date Set Methods
Math
Math Random
Booleans
Comparisons
If Else
Switch
For Loops
For In Loops
For Of Loops
While Loops
Break and Continue
Iterables
Sets
Set Methods
Maps
Map Methods
TypeOf
Type Conversion
Destructuring
Bitwise
Regular Expressions
Operator Precedence
Error Handling
Scope
Hoisting
Strict Mode
The this Keyword
Arrow Function
Classes
Modules
JSON
Debugging
HTML DOM
HTML DOM Methods
HTML DOM Docuement
HTML DOM Elements
HTML DOM HTML
HTML DOM Form Validation
HTML DOM CSS
HTML DOM Events
HTML DOM Event Listener
HTML DOM Nodes
HTML DOM Collections
HTML DOM Node List
Log in to track your progress
If you haven't already, sign up to become a W3Schooler, and get points for every exercise you complete.
As a logged on W3Schools user you will have access to many features like having your own web page, track your learning progress, receive personal guided paths, and more.
The Exercise
We have gathered a variety of React exercises from most of the chapters in our JavaScript Tutorial.
The exercises are a mix of "multiple choice" and "fill in the blanks" questions. The answer can be found in the corresponding tutorial chapter. If you're stuck, or answer wrong, you can try again or hit the "Show Answer" button to see the correct answer.