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
10 questions
Scratch (28th March)

Quiz
•
KG - University
20 questions
Cuestionario de Base de Datos II

Quiz
•
1st - 5th Grade
10 questions
JavaScript: Coerción y Tipos de Datos

Quiz
•
1st - 10th Grade
20 questions
Scratch Pre-Assessment

Quiz
•
5th - 9th Grade
10 questions
C3 quiz2

Quiz
•
4th - 8th Grade
12 questions
Scratch Introduction Quiz

Quiz
•
1st - 8th Grade
20 questions
Latihan Soal Informatika Kelas 5

Quiz
•
5th Grade
20 questions
HKICO 2023 - ĐỀ ÔN TẬP SỐ 4

Quiz
•
1st - 5th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade