
JavaScript Quiz
Quiz
•
Computers
•
12th Grade
•
Practice Problem
•
Medium
Tyler Newman
Used 1+ times
FREE Resource
Enhance your content in a minute
22 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code print to the console?
developer
"developer"
Naomi
"Naomi"
Answer explanation
The code will print "Naomi" to the console because the string is enclosed in double quotes, indicating a literal string.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a non-primitive data type in JavaScript?
Number
String
Boolean
Array
Answer explanation
The non-primitive data type in JavaScript is Array. Number, String, and Boolean are all primitive data types.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you access the first value in an array named 'rows' in JavaScript?
rows[1]
rows[0]
rows.first
rows[2]
Answer explanation
To access the first value in an array named 'rows' in JavaScript, you use 'rows[0]' since array indexing starts at 0.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword should be used to declare variables that should not be reassigned in JavaScript?
A) let
B) var
C) const
D) static
Answer explanation
The keyword 'const' should be used to declare variables that should not be reassigned in JavaScript.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the .log() method do in JavaScript?
A) Adds a value to the end of an array
B) Removes the first element from an array
C) Logs a message to the console
D) Removes the last element from an array
Answer explanation
The .log() method in JavaScript logs a message to the console, making option C the correct choice.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the less than operator (<) allow you to check?
If the value on the left is greater than the value on the right
If the value on the left is equal to the value on the right
If the value on the left is less than the value on the right
If the value on the right is less than the value on the left
Answer explanation
The less than operator (<) allows you to check if the value on the left is less than the value on the right.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the expression count < 3 evaluate to if count is 4?
false
true
undefined
null
Answer explanation
The expression count < 3 will evaluate to false if count is 4 because 4 is not less than 3. Therefore, the correct answer is false.
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
20 questions
Mobile Apps PayKu
Quiz
•
1st Grade - Professio...
17 questions
Music, Politics, Poetry, Tech 2021
Quiz
•
3rd Grade - University
20 questions
DBI LO
Quiz
•
7th - 12th Grade
20 questions
Database&Relation
Quiz
•
12th Grade
20 questions
Data structure test1
Quiz
•
12th Grade
18 questions
School Mangement System ICT 0417 IGCSE
Quiz
•
10th - 12th Grade
20 questions
Latihan Soal Administrasi Infrastruktur Jaringan XII TKJ
Quiz
•
10th - 12th Grade
27 questions
Adobe Illustrator Quiz Review
Quiz
•
9th - 12th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd 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
Discover more resources for Computers
15 questions
Internet Vocabulary Notebook Check #2 - CTEA(2024)
Quiz
•
12th Grade
11 questions
Internet Terms Vocabulary- Notebook Check #1- CTEA
Quiz
•
12th Grade
50 questions
Money Matters Fall 2025 Final Exam — Worksheet Questions
Quiz
•
12th Grade
47 questions
CSF Final Exam Practice
Quiz
•
9th - 12th Grade
