JavaScript Day 2

JavaScript Day 2

University

10 Qs

quiz-placeholder

Similar activities

PHP questions

PHP questions

University

9 Qs

JS QUIZ

JS QUIZ

University

8 Qs

EVIDENCIA DE CONOCIMIENTO HTML CSS Y JAVASCRIPT

EVIDENCIA DE CONOCIMIENTO HTML CSS Y JAVASCRIPT

University

10 Qs

R programming

R programming

University

15 Qs

test

test

University

15 Qs

Database NoSQL (MongoDB)

Database NoSQL (MongoDB)

University - Professional Development

12 Qs

Php Teste

Php Teste

University - Professional Development

10 Qs

Frontend Quiz 5 summer internship

Frontend Quiz 5 summer internship

University

10 Qs

JavaScript Day 2

JavaScript Day 2

Assessment

Quiz

Other

University

Hard

Created by

Abdul Roshan

Used 2+ times

FREE Resource

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