
Javascript Quiz
Authored by Sharad Jain
Computers
Professional Development
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
What does the typeof operator return when used with an array in JavaScript?
array
object
array-object
undefined
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is true about the localStorage object in JavaScript?
stores data on the server-side.
It stores data only for the duration of the session.
It stores data permanently even after the browser is closed.
It cannot store data in key-value pairs.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
. Which method is used to add new elements to the end of an array in JavaScript?
push()
pop()
shift()
unshift()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the querySelectorAll() method in JavaScript?
To select the first element that matches a specified CSS selector
To select all elements that match a specified CSS selector
To modify the CSS of an element
To create a new HTML element
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the filter() method do in JavaScript?
Removes elements from an array based on a condition and returns a new array
Adds new elements to an array
Sorts the elements of an array
Reverses the order of the elements in an array
6.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
Which statement correctly declares a function in JavaScript?
function = myFunction() {}
var myFunction = function() {}
function myFunction() {}
myFunction() = function() {}
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the Math.random() function in JavaScript?
It generates a random number between 0 (inclusive) and 1 (exclusive).
It rounds a number to the nearest integer.
It calculates the square root of a number.
It generates a random integer between two specified values.
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
ASK : : KOD ARAHAN
Quiz
•
10th Grade - Professi...
15 questions
Technical Training
Quiz
•
Professional Development
20 questions
Linguaxes de marcas: HTML
Quiz
•
Professional Development
20 questions
POST TEST WEB STATIC
Quiz
•
University - Professi...
16 questions
Cyber Resilience Training
Quiz
•
Professional Development
20 questions
Computers
Quiz
•
7th Grade - Professio...
20 questions
1ºDAM/DAW - Entornos de Desarrollo - UD1-6 - Prof. C. Boni
Quiz
•
University - Professi...
15 questions
Telco Practice Test 1
Quiz
•
Professional Development
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
Discover more resources for Computers
10 questions
How to Email your Teacher
Quiz
•
Professional Development
6 questions
3RD GRADE DECLARATION OF INDEPENDENCE EXIT TICKET
Quiz
•
Professional Development
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
22 questions
Multiplying Exponents with the Same Base
Quiz
•
9th Grade - Professio...
40 questions
Flags of the World
Quiz
•
KG - Professional Dev...