PRACTICE • LEARN • GROW
Module 1 Final Quiz: Getting Started MCQs
Solve topic-wise placement questions and improve your skills.
Module 1 Final Quiz: Getting Started Progress
0 of 12 completed
0%
Topic Track
You are viewing MCQs in preview mode. Log in to select options, submit answers, and track your progress.
Log In to Answer
1
Who created JavaScript and in what year was it first developed at Netscape?
A.
James Gosling in 1995
B.
Brendan Eich in 1995
C.
Bjarne Stroustrup in 1985
D.
Guido van Rossum in 1991
Explanation & Key
Correct Answer:
2
How do modern JavaScript engines like Google V8 execute code for optimal runtime speed?
A.
Pure line-by-line interpretation without any compilation
B.
Compiling entirely ahead-of-time (AOT) into a static native binary
C.
A hybrid JIT approach using an interpreter (Ignition) for fast startup and an optimizing compiler (TurboFan) for hot code paths
D.
Transpiling directly to C++ source code before execution
Explanation & Key
Correct Answer:
3
What is the primary performance benefit of using the 'defer' attribute on an external <script> tag?
A.
It executes the script synchronously before HTML parsing begins
B.
It downloads the script in parallel with HTML parsing and executes in document order only after the DOM is fully parsed
C.
It runs the script in a separate background Web Worker thread
D.
It executes the script immediately the moment it finishes downloading, regardless of DOM readiness
Explanation & Key
Correct Answer:
4
What is the output of the following code snippet?
const user = { name: 'Alice' };
user.name = 'Bob';
console.log(user.name);
A.
'Alice'
B.
TypeError: Assignment to constant variable
C.
'Bob'
D.
undefined
Explanation & Key
Correct Answer:
5
Which of the following is NOT one of the 7 primitive data types in JavaScript?
A.
BigInt
B.
Symbol
C.
Array
D.
Undefined
Explanation & Key
Correct Answer:
6
What does the expression
typeof null evaluate to in JavaScript?
A.
'null'
B.
'undefined'
C.
'object'
D.
'boolean'
Explanation & Key
Correct Answer:
7
What is the output of the following floating-point comparison?
console.log(0.1 + 0.2 === 0.3);
A.
true
B.
false
C.
NaN
D.
TypeError
Explanation & Key
Correct Answer:
8
What is the output of the following loose vs strict comparisons?
console.log('5' == 5, '5' === 5);
A.
true true
B.
true false
C.
false true
D.
false false
Explanation & Key
Correct Answer:
9
What will be printed to the console?
const count = 0;
console.log(count || 10, count ?? 10);
A.
10 10
B.
0 0
C.
10 0
D.
0 10
Explanation & Key
Correct Answer:
10
What is the output of optional chaining when accessing a null property?
const user = { profile: null };
console.log(user.profile?.avatar);
A.
TypeError: Cannot read property 'avatar' of null
B.
undefined
C.
null
D.
false
Explanation & Key
Correct Answer:
11
What is the output of the following expression?
console.log(typeof NaN);
A.
'NaN'
B.
'undefined'
C.
'number'
D.
'object'
Explanation & Key
Correct Answer:
12
What is the output of the following assignment?
let a = { n: 1 };
let b = a;
a.n = 2;
console.log(b.n);
A.
1
B.
2
C.
undefined
D.
ReferenceError
Explanation & Key
Correct Answer:
Question Palette
Answered
Current
Not Attempted
Wrong