JavaScript Basics Quiz

JavaScript Basics Quiz

University

20 Qs

quiz-placeholder

Similar activities

How Bright Are You?

How Bright Are You?

University

20 Qs

Criminal Justice System 1

Criminal Justice System 1

University

20 Qs

SOAL UKOM PROFESI NERS

SOAL UKOM PROFESI NERS

University

20 Qs

Perancangan dan Pembinaan Ujian

Perancangan dan Pembinaan Ujian

University

18 Qs

MUN QUIZ#2

MUN QUIZ#2

7th Grade - Professional Development

20 Qs

Computers

Computers

University

20 Qs

Plastic Pollution

Plastic Pollution

8th Grade - University

20 Qs

Grooming tools & equipment

Grooming tools & equipment

12th Grade - University

20 Qs

JavaScript Basics Quiz

JavaScript Basics Quiz

Assessment

Quiz

Education

University

Practice Problem

Medium

Created by

Rw8 Sodvadiya

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...

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()

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?