JavaScript Day 2

JavaScript Day 2

University

10 Qs

quiz-placeholder

Similar activities

Quiz sobre Introducción a la Ciencia Psicológica

Quiz sobre Introducción a la Ciencia Psicológica

University

10 Qs

Estrutura da personalidade

Estrutura da personalidade

University

12 Qs

AILET-01 (2020)

AILET-01 (2020)

11th Grade - Professional Development

15 Qs

PHP Beginners Quiz

PHP Beginners Quiz

University

15 Qs

Examen de Introducción a la economía

Examen de Introducción a la economía

11th Grade - University

12 Qs

Marvel quiz

Marvel quiz

KG - Professional Development

11 Qs

Drug For Anti-Hypertension

Drug For Anti-Hypertension

University

11 Qs

REVISION CHAPTER 2 SC015

REVISION CHAPTER 2 SC015

University

10 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';

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?