
JavaScript Basics Quiz
Authored by Rw8 Sodvadiya
Education
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to declare a variable in JavaScript?
dim
declare
var
int
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you write “Hello World” in an alert box?
alertBox("Hello World");
msgBox("Hello World");
alert("Hello World");
msg("Hello World");
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to output "Hi" to the browser console?
print("Hi")
console.print("Hi")
console.log("Hi")
log.console("Hi")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is a correct JavaScript data type?
integer
decimal
object
real
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of `2 + "2"` in JavaScript?
4
22
Error
NaN
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method selects an element with a specific class?
getElementByClassName
getElementsByClassName
queryElementClass
classSelector
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to add a click event to a button?
addEvent
onClick()
addEventListener()
clickEvent()
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
17 questions
Public Relations
Quiz
•
10th Grade - University
20 questions
UNIT 6, UK The Class System 22A
Quiz
•
12th Grade - University
20 questions
KUIZ AKAUN : Klasifikasi Akaun
Quiz
•
6th Grade - Professio...
20 questions
REVISION 3 : TOPIC 3, 4, 5 & 7
Quiz
•
1st Grade - University
20 questions
NES 2024
Quiz
•
University
15 questions
HTML Quizz
Quiz
•
University
15 questions
Assessment of Learning
Quiz
•
University
19 questions
Lectura comprensiva
Quiz
•
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