
JavaScript Test 1
Quiz
•
Computers
•
9th - 12th Grade
•
Practice Problem
•
Easy
Ryan Valles
Used 1+ times
FREE Resource
Enhance your content in a minute
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
Create a free account and access millions of resources
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
0 questions
JavaScript Loops Quiz
Quiz
•
0 questions
Fundamentals of Programming Part 2
Quiz
•
0 questions
Understanding Conditional Statements in Code.org Unit 4 Lesson 7
Quiz
•
0 questions
JavaScript Basics
Quiz
•
0 questions
JavaScript Loop Mastery
Quiz
•
0 questions
Understanding If-Else Statements in JavaScript
Quiz
•
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
