JavaScript Quiz

JavaScript Quiz

University

10 Qs

quiz-placeholder

Similar activities

control system

control system

University

10 Qs

Skillful Readers Demonstrate...

Skillful Readers Demonstrate...

University

10 Qs

SPS411: REVISION (TUTORIAL)

SPS411: REVISION (TUTORIAL)

University

15 Qs

Getting to know the Philippines!

Getting to know the Philippines!

3rd Grade - Professional Development

15 Qs

QUIZ GEN Z

QUIZ GEN Z

University

10 Qs

Google Classroom 101

Google Classroom 101

University - Professional Development

10 Qs

SLT as an explanation of aggression

SLT as an explanation of aggression

University

15 Qs

JavaScript Quiz

JavaScript Quiz

Assessment

Quiz

Other

University

Practice Problem

Medium

Created by

Gnaneshwar Reddy

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does document.getElementById("demo") do?

Changes the class of an element

Adds a new element

Selects an element with ID "demo"

Removes an element

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method adds a click event listener to a button?

button.listen("click")

button.addEvent("click", function)

button.addEventListener("click", function)

button.onClick(function)

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will [].forEach() do in JavaScript?

Modify the array directly

Create a new array

Loop through each element

Remove elements from the array

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method returns a new array with transformed values?

filter()

map()

forEach()

reduce()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of typeof null in JavaScript?

"null"

"undefined"

"object"

"nulltype"

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct if statement?

if x == 5:

if x = 5

if (x == 5) {}

if x = 5 {}

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does filter() return?

A boolean

A single value

A modified original array

A new array with filtered elements

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?