Lancecourse
Courses
How-tos
Blog
Sign In
Sign Up
free
Francais
JavaScript Fundamentals
A quiz to test your knowledge of JavaScript basics.
Question 1
Which symbol is used to comment out a single line in JavaScript?
//
/*
#
&&
Question 2
What is the keyword used to declare a variable that cannot be reassigned?
const
let
var
immutable
Question 3
Which of the following keywords is used to declare a variable that can be reassigned?
let
const
static
various
Question 4
What does the fetch() function do in JavaScript?
Sends and receives data asynchronously
Creates a new HTML element
Writes data to the console
None of the above
Question 5
What will the following code output? console.log(typeof "Hello");
string
string value
number
text
Question 6
What is the purpose of the document.getElementById() method?
To retrieve an element by its ID
To create a new HTML element
To change the ID of an element
None of the above
Question 7
Which of the following is a way to include JavaScript in an HTML document?
<script> tag
<javascript> tag
<js> tag
<code> tag
Question 8
Which of the following is NOT a JavaScript data type?
ArrayList
Object
Function
Boolean
Question 9
What does HTML stand for?
Hyper Text Markup Language
High Text Markup Language
Hyperlink and Text Markup Language
None of the above
Question 10
Which data type is used to represent true or false values in JavaScript?
Boolean
String
Integer
Object
Answer all the questions then submit.
Submit Answers