JavaScript Basics Quiz (Medium)

JavaScript Basics Quiz (Medium)

University

65 Qs

quiz-placeholder

Similar activities

ICT/NGEC 9 ONLINE QUIZ

ICT/NGEC 9 ONLINE QUIZ

University

67 Qs

APLIKASI KOMPUTER

APLIKASI KOMPUTER

University

63 Qs

Module Communication - Email

Module Communication - Email

7th Grade - University

60 Qs

Mock test - Data Structures

Mock test - Data Structures

University

60 Qs

Online Exam in NGEC 9 (BSMT-IE)

Online Exam in NGEC 9 (BSMT-IE)

University

66 Qs

Data Communication Final Exam

Data Communication Final Exam

University

70 Qs

Doors

Doors

1st Grade - Professional Development

60 Qs

SECOND REVIEWER | EMPOWERMENT TECHNOLOGIES

SECOND REVIEWER | EMPOWERMENT TECHNOLOGIES

University

60 Qs

JavaScript Basics Quiz (Medium)

JavaScript Basics Quiz (Medium)

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

VIKAS BANDARU

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

65 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which declaration prevents re-assignment of the variable?

var
let
const
let const
None of the above

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which one correctly generates a random number between 1 and 10 (inclusive)?

Math.random(1,10)
Math.floor(Math.random() * 10)
Math.floor(Math.random() * 10) + 1
Math.ceil(Math.random() * 10)
Math.round(Math.random() * 10)

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the output of '5' + 3?

8
53
None of the above
Error
undefined

4.

MULTIPLE SELECT QUESTION

20 sec • 1 pt

Which DOM method is used to access the element with id='score'?

getElementsByClassName('score')
querySelector('.score')
getElementById('score')
querySelector('#score')
getElementsByName('score')

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What will the following return: typeof NaN?

number

NaN

undefined

object

null

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Which of the following are falsy values in JavaScript?

None of the above
0
undefined
None of the above
All of the above

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

What is the correct way to attach a click event to a button in JS?

button.onClick(play());
button.addEventListener('click', play);
addEventListener(button, 'click', play);
onClick(button, play);
click(button, play);

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?