JavaScript Fundamentals

A quiz to test your knowledge of JavaScript basics.

Question 1

Which data type is used to represent true or false values in JavaScript?

Question 2

What will the following code output? console.log(typeof "Hello");

Question 3

What is the keyword used to declare a variable that cannot be reassigned?

Question 4

Which of the following is NOT a JavaScript data type?

Question 5

Which symbol is used to comment out a single line in JavaScript?

Question 6

Which of the following keywords is used to declare a variable that can be reassigned?

Question 7

What is the purpose of the document.getElementById() method?

Question 8

What does the fetch() function do in JavaScript?

Question 9

Which of the following is a way to include JavaScript in an HTML document?

Question 10

What does HTML stand for?