Table of Contents
Block scope in JavaScript
🔒 Please log in to unlock this course.
MCQ Section
MCQ 1
What will be the output of the following JavaScript code? var a = 12; { var b = 12; console.log(a);…
Locked. Enroll to open this MCQ.
MCQ 2
What will be the output of the following JavaScript code? let a = 12; { var a = 12; console.log(a);…
Locked. Enroll to open this MCQ.
MCQ 3
What will be the output of the following JavaScript code? let a = 12; { let a = 15; console.log(a);…
Locked. Enroll to open this MCQ.
MCQ 4
What will be the output of the following JavaScript code? var a = 12; { let a = 65; console.log(a);…
Locked. Enroll to open this MCQ.
MCQ 5
What will be the output of the following JavaScript code? let a = 12; function show() { var a = 22;…
Locked. Enroll to open this MCQ.
MCQ 6
What will be the output of the following JavaScript code? var a = 12; const a = 12; { const a = 22;…
Locked. Enroll to open this MCQ.
MCQ 7
What will be the output of the following JavaScript code? const a = 11; { const a = 22; { const a =…
Locked. Enroll to open this MCQ.
MCQ 8
What will be the output of the following JavaScript code? const a = 11; { const a = 22; { const a =…
Locked. Enroll to open this MCQ.
MCQ 9
What will be the output of the following JavaScript code? const a = 11; const a = 12;
Locked. Enroll to open this MCQ.
MCQ 10
What will be the output of the following JavaScript code? var a = 11; var a = 12; console.log(a)
Locked. Enroll to open this MCQ.
MCQ 11
What will be the output of the following JavaScript code? let a = 11; let a = 12;
Locked. Enroll to open this MCQ.