
JavaScript Test 1
Authored by Ryan Valles
Computers
9th - 12th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
23 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function in JavaScript is used to prompt the user for input?
input()
prompt()
ask()
getInput()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the value null represent in JavaScript?
A defined variable.
An undefined variable.
A boolean value.
A nullified function.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to concatenate strings in JavaScript?
+
-
*
/
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does an if statement do in JavaScript?
Executes a block of code repeatedly.
Executes a block of code only if a specified condition is true.
Terminates the program.
Declares variables.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the difference between a while loop and a for loop?
A while loop requires a counter variable.
A for loop cannot contain conditions.
A while loop executes a block of code while a condition is true, without an explicit counter.
A for loop is more efficient for iterating over arrays.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to add alternative code to an if statement, to be executed if the condition is false?
else
and
or
then
7.
MULTIPLE SELECT QUESTION
30 sec • 1 pt
Which of the following is a valid JavaScript variable name?
2ndVariable
_variable
$variableName
variable name
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
20 questions
UH 1 Berfikir Komputasional
Quiz
•
10th Grade
18 questions
Типы данных, операторы в Паскале
Quiz
•
10th Grade
20 questions
Kiểm tra TX1_Tin 11_KNTT
Quiz
•
11th Grade
20 questions
Teknologi Layanan Jaringan XI TKJ
Quiz
•
11th Grade
19 questions
UNIT 1.2 MEMORY
Quiz
•
10th Grade
20 questions
HTML QUIZ # 3
Quiz
•
10th Grade
21 questions
Visual Basic Assessment
Quiz
•
11th - 12th Grade
20 questions
CORLANG Week6-7
Quiz
•
10th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade