JavaScript Basics Quiz (Medium)

JavaScript Basics Quiz (Medium)

University

65 Qs

quiz-placeholder

Similar activities

Test 1 Category B

Test 1 Category B

University

60 Qs

ACT - 2G CHAPTER 1 - LESSON 2 & 3 - QUIZ

ACT - 2G CHAPTER 1 - LESSON 2 & 3 - QUIZ

University

63 Qs

IT 325 Midterm Reviewer

IT 325 Midterm Reviewer

University

60 Qs

FDS_MIDTERM

FDS_MIDTERM

University

60 Qs

System Analysis and Design - Midterm (BSIT 3)

System Analysis and Design - Midterm (BSIT 3)

University

60 Qs

DATA STRUCTURES

DATA STRUCTURES

University

60 Qs

JAVA QUIZZ-3

JAVA QUIZZ-3

University

60 Qs

JAVA PROG2 Test

JAVA PROG2 Test

University

60 Qs

JavaScript Basics Quiz (Medium)

JavaScript Basics Quiz (Medium)

Assessment

Quiz

Computers

University

Hard

Created by

VIKAS BANDARU

Used 2+ times

FREE Resource

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
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?