
JavaScript Exercise Quiz

Quiz
•
Computers
•
9th - 12th Grade
•
Medium
WaiLin Htet
Used 1+ times
FREE Resource
85 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the correct syntax for referring to an external script called "app.js"?
<script href="app.js">
<script src="app.js">
<script ref="app.js">
<script link="app.js">
2.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you write "Hello World" in an alert box?
alertBox("Hello World");
msg("Hello World");
alert("Hello World");
message("Hello World");
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which operator is used to assign a value to a variable?
=
==
===
:=
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What will typeof null return?
"null"
"object"
"undefined"
"string"
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you create a function in JavaScript?
function myFunction() {}
def myFunction() {}
function:myFunction() {}
myFunction() = function {}
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Which method is used to add an element to the end of an array?
push()
pop()
shift()
unshift()
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
How do you declare a variable in JavaScript?
var x;
variable x;
v x;
let = x;
Create a free account and access millions of resources
Similar Resources on Wayground
80 questions
First Quarter Summative Test - October 23, 2023

Quiz
•
11th Grade
80 questions
Computer grade10

Quiz
•
10th Grade - University
89 questions
GCSE Computer Science - Paper 2 (Algorithms & Programming)

Quiz
•
12th Grade
80 questions
Premiere Pro

Quiz
•
8th - 10th Grade
90 questions
Data Structures Full

Quiz
•
11th Grade
80 questions
User interface, Input and output devices

Quiz
•
8th - 10th Grade
88 questions
Unit 1.1 How IT can be used to fulfil the needs of organisations

Quiz
•
11th Grade
80 questions
MOCK Exam 2

Quiz
•
7th - 11th Grade
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade