Javascript Programming Language

444 questions in the bank
Are you ready to take quiz?
Explore more
Logo
About the Quiz

Quiz will ask 20 randomly selected questions with allotted time of . You can take the quiz more than once. Once you submit the quiz, you can review how you have done, the correct the answers for each questions and the explanation for the correct the answer.

INR100.00
INR1000.00
Unlimited Attempts   (lifetime access)

Try your first attempt for free.

Quiz Topics

10 Modules

Fundamentals

4 topics
1.

Control Structures (if, switch, for, while, do-while)

9 questions
2.

Data Types (string, number, boolean, null, undefined, symbol, object)

10 questions
3.

Operators (arithmetic, comparison, logical, bitwise)

10 questions
4.

Variables (let, const, var)

10 questions

Functions

5 topics

Objects and Arrays

5 topics

Asynchronous JavaScript

5 topics

DOM Manipulation

5 topics

ES6+ Features

5 topics

Error Handling

4 topics

Performance Optimization

4 topics

Testing

4 topics

Frameworks and Libraries

4 topics
Sample questions

Which of the following statements about 'var', 'let', and 'const' are correct?

Variables declared with 'var' are function-scoped.

Variables declared with 'let' are block-scoped.

Variables declared with 'const' can be reassigned.

Variables declared with 'const' must be initialized at the time of declaration.

What will be the output of the following code?

var x = 10;
if (true) {
    var x = 20;
}
console.log(x);

10

20

ReferenceError

undefined

What will be the output of the following code?

let a = 1;
if (true) {
    let a = 2;
}
console.log(a);

1

2

ReferenceError

undefined

Which of the following are true regarding hoisting in JavaScript?

'var' declarations are hoisted to the top of their function scope.

'let' and 'const' declarations are hoisted but not initialized.

Variables declared with 'let' can be accessed before their declaration.

Functions declared with 'var' can be invoked before their declaration.

What will be the output of the following code?

const obj = { prop: 1 };
obj.prop = 2;
console.log(obj.prop);

1

2

ReferenceError

TypeError

INR100.00
INR1000.00
Unlimited Attempts   (lifetime access)

Try your first attempt for free

Signup to add this to cart.

Quiz Topics

10 Modules

Fundamentals

4 topics
1.

Control Structures (if, switch, for, while, do-while)

9 questions
2.

Data Types (string, number, boolean, null, undefined, symbol, object)

10 questions
3.

Operators (arithmetic, comparison, logical, bitwise)

10 questions
4.

Variables (let, const, var)

10 questions

Functions

5 topics

Objects and Arrays

5 topics

Asynchronous JavaScript

5 topics

DOM Manipulation

5 topics

ES6+ Features

5 topics

Error Handling

4 topics

Performance Optimization

4 topics

Testing

4 topics

Frameworks and Libraries

4 topics