
JavaScript Concepts Quiz

Quiz
•
Mathematics
•
2nd Grade
•
Hard
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct way to declare a variable in JavaScript?
`var myVariable;`
`variable myVariable;`
`v myVariable;`
`declare myVariable;`
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a correct way to define a function in JavaScript?
`function myFunction() {}`
`def myFunction() {}`
`function: myFunction() {}`
`func myFunction() {}`
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the `async` keyword in JavaScript?
To make a function run faster
To declare a function that returns a promise
To pause the execution of a function
To make a function synchronous
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to select an element by its ID in the DOM?
`document.getElementById()`
`document.querySelector()`
`document.getElementsByClassName()`
`document.getElementsByTagName()`
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does the `map()` method do in JavaScript arrays?
It modifies the original array
It creates a new array with the results of calling a provided function on every element
It filters the array based on a condition
It sorts the array in ascending order
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you create a promise in JavaScript?
`let promise = new Promise();`
`let promise = Promise.create();`
`let promise = new Promise((resolve, reject) => {});`
`let promise = Promise();`
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is a valid way to add an event listener to a DOM element?
`element.addEventListener('click', function() {});`
`element.on('click', function() {});`
`element.listen('click', function() {});`
`element.event('click', function() {});`
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Tile Arrays

Quiz
•
2nd - 3rd Grade
10 questions
Arrays

Quiz
•
2nd Grade
10 questions
Conceitos de Java Script

Quiz
•
2nd Grade
14 questions
Everyday Math Unit 6 Review

Quiz
•
2nd Grade
15 questions
Math Olympics 2nd Grade

Quiz
•
2nd - 3rd Grade
10 questions
Arrays and Odd and Even

Quiz
•
2nd Grade
10 questions
Even odd

Quiz
•
2nd Grade
9 questions
Simple Arrays

Quiz
•
2nd Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Mathematics
20 questions
addition

Quiz
•
1st - 3rd Grade
20 questions
Addition and Subtraction facts

Quiz
•
1st - 3rd Grade
20 questions
Place Value

Quiz
•
KG - 3rd Grade
17 questions
Place value

Quiz
•
2nd Grade
20 questions
Liquid Measurement

Quiz
•
2nd - 5th Grade
20 questions
Arrays/Repeated Addition

Quiz
•
2nd Grade
15 questions
3 Digit Addition with Regrouping

Quiz
•
2nd Grade
39 questions
Arrays and Repeated Addition

Quiz
•
2nd Grade