JavaScript Day 2

JavaScript Day 2

University

10 Qs

quiz-placeholder

Similar activities

Dream Smp

Dream Smp

KG - University

10 Qs

FILMS

FILMS

KG - Professional Development

15 Qs

Dragon ball quiz

Dragon ball quiz

5th Grade - University

6 Qs

Kuis PMO 2022

Kuis PMO 2022

University

15 Qs

National Day Quiz

National Day Quiz

University

12 Qs

football of world

football of world

1st Grade - University

13 Qs

Anime 99

Anime 99

9th Grade - Professional Development

13 Qs

Unit 2 Body of Presentation

Unit 2 Body of Presentation

University

12 Qs

JavaScript Day 2

JavaScript Day 2

Assessment

Quiz

Other

University

Practice Problem

Hard

Created by

Abdul Roshan

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

10 questions

Show all answers

1.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following is a correct way to declare a variable in JavaScript?

variable name = 'John';

let name = 'John';

const name = 'John';

var name 'John';

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not a primitive data type in JavaScript?

Number

String

Object

Boolean

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of the following expression: '5' + 3?

8

53

35

None

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

var x = 10;

if (true) {

var x = 20;

}

console.log(x);

10

20

Undefined

Null

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code?

let y = 10;

if (true) {

let y = 20;

}

console.log(y);

10

20

Error

Undefined

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method is used to convert all the lowercase letters in a string to uppercase in JavaScript?

toLowerCase()

toUpperCase()

capitalize()

uppercase()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following declarations will result in an error if the variable is reassigned or redeclared?

var name = 'John';

let name = 'John';

const name = 'John';

var name;

name = 'John';

Access all questions and much more by creating a free account

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?