Basic JavaScript Programming Quiz

Quiz
•
Computers
•
5th Grade
•
Hard
Muhammad Nezad
Used 5+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
Which of the following is a correct way to declare a variable in JavaScript?
var myVariable;
variable myVariable;
v myVariable;
declare myVariable;
2.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
What is the correct syntax for referring to an external script called "script.js"?
<script src="script.js"></script>
<script link="script.js"></script>
<script ref="script.js"></script>
<script href="script.js"></script>
3.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
How do you write "Hello World" in an alert box?
alert("Hello World");
msg("Hello World");
alertBox("Hello World");
msgBox("Hello World");
4.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
How do you create a function in JavaScript?
function myFunction() {}
create myFunction() {}
function:myFunction() {}
def myFunction() {}
5.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
How do you call a function named "myFunction"?
call myFunction();
myFunction();
call function myFunction();
execute myFunction();
6.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
How do you write an IF statement in JavaScript?
if i = 5 then
if i == 5 then
if (i == 5)
if i = 5
7.
MULTIPLE CHOICE QUESTION
10 sec • 5 pts
How does a WHILE loop start in JavaScript?
while (true){}
while true do
while i < 6:
while true:
Create a free account and access millions of resources
Similar Resources on Wayground
13 questions
Code Combat JavaScript Quiz

Quiz
•
4th - 8th Grade
12 questions
CodeMonkey Coding Vocabulary

Quiz
•
3rd - 7th Grade
10 questions
Programming Knowledge Quiz (Medium)

Quiz
•
5th Grade - Professio...
10 questions
Java Strings

Quiz
•
1st Grade - Professio...
15 questions
Scratch Arithmetic Operators

Quiz
•
4th - 7th Grade
18 questions
js basics

Quiz
•
4th Grade - University
17 questions
Lección1 - JavaScript

Quiz
•
1st Grade - Professio...
20 questions
Пишем код с HTML, CSS и JavaScript

Quiz
•
4th - 7th Grade
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade