
Javascript Quiz

Quiz
•
Computers
•
Professional Development
•
Easy

Sharad Jain
Used 1+ times
FREE Resource
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.
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Test JS

Quiz
•
Professional Development
15 questions
AWS Cloud

Quiz
•
Professional Development
20 questions
Java Quiz

Quiz
•
Professional Development
17 questions
Java programming

Quiz
•
Professional Development
20 questions
Chapter 2: The Internet, the Web, and Electronic Commerce

Quiz
•
Professional Development
20 questions
SPARK FIDDLE

Quiz
•
Professional Development
20 questions
Web Development Technical Skills

Quiz
•
Professional Development
20 questions
JavaScript - Cuestionario de Repaso

Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
11 questions
All about me

Quiz
•
Professional Development
10 questions
How to Email your Teacher

Quiz
•
Professional Development
15 questions
Fun Random Trivia

Quiz
•
Professional Development
22 questions
Anne Bradstreet 1612-1672

Quiz
•
Professional Development
18 questions
Spanish Speaking Countries and Capitals

Quiz
•
KG - Professional Dev...
14 questions
Fall Trivia

Quiz
•
11th Grade - Professi...
15 questions
Disney Characters Quiz

Quiz
•
Professional Development
15 questions
Quiz to Highlight Q types & other great features in Wayground

Quiz
•
Professional Development