Independent Preparation Bank for Pakistani Computing Graduates • 100% Free • No Signup
NSCTTest.
Simulator
Home/Subjects/Web Development/HTML Fundamentals
Web DevelopmentTopic #3 of 539 MCQs Available

HTML Fundamentals

Comprehensive question bank, step-by-step rationales, and dedicated timed quiz for HTML Fundamentals.

Launch Quiz Mode ↗

HTML Fundamentals Question Bank

Showing 39 questions of 39 with verified answers

2Multiple Choice

(Conceptual) Which of the following is the correct way to declare a variable that is block-scoped and cannot be reassigned?

3Multiple Choice

(Code-Tracing) What is the result of 5 + 2 + "3" in JavaScript?

4Multiple Choice

(Conceptual) What is the main difference between null and undefined in JavaScript?

5Multiple Choice

(Code-Tracing) What will be the output of the following block?

6Multiple Choice

(Conceptual) What is a Closure in JavaScript?

7Multiple Choice

(Code/Console Logic) What does the following Arrow Function return?

8Multiple Choice

(Conceptual) What is the purpose of the Array.map() method?

9Multiple Choice

(Scenario-Based) You want to trigger a function when a user clicks a button. Which is the correct approach?

10Multiple Choice

(Conceptual) JavaScript is Single-Threaded. How does it handle long-running operations like API requests without freezing the UI?

11Multiple Choice

(Code/Logic) What is the result of ![] in JavaScript?

12Multiple Choice

(Conceptual) What does the JSON.stringify() method do?

13Multiple Choice

(Scenario-Based) You need to ensure a variable defined inside an if block cannot be accessed outside of it. Which keyword should you use?

14Multiple Choice

(Conceptual) What is a Promise in JavaScript?

15Multiple Choice

(Code/Logic) What is the output of typeof null?

16Multiple Choice

(Conceptual) What is the purpose of the Spread Operator (...) in arrays?

17Multiple Choice

(Conceptual) Which array method is used to iterate through all elements and filter them based on a condition?

18Multiple Choice

(Conceptual) What does the Destructuring Assignment allow you to do?

19Multiple Choice

(Code/Logic) What does the following code demonstrate? script.js

20Multiple Choice

(Conceptual) What is a Callback Function?

1Multiple Choice

(Code-Tracing) Predict the output of this closure example.

2Multiple Choice

(Conceptual) What is the main purpose of the Prototype Chain in JavaScript?

3Multiple Choice

(Code-Tracing) What will be the value of this inside the arrow function?

4Multiple Choice

(Conceptual) How do ES6 Modules (export/import) improve upon traditional <script> tags?

5Multiple Choice

(Code-Tracing) What does this spread operator code produce?

6Multiple Choice

(Comparison) What is the difference between Promise.all() and Promise.allSettled()?

7Multiple Choice

(Conceptual) Which mechanism does JavaScript use to implement Asynchronous code? spread.js const arr1 = [1, 2]; const arr2 = [...arr1, 3]; console.log(arr2);

8Multiple Choice

(Conceptual) What does the Object.freeze() method do?

9Multiple Choice

(Code-Tracing) What is the output of this code snippet?

10Multiple Choice

(Conceptual) What is the purpose of the Spread syntax in object literals? event_loop.js console.log('1'); setTimeout(() => console.log('2'), 0); console.log('3');

11Multiple Choice

(Code/Logic) What is the value of y in this destructuring assignment? const [x, , y] = [10, 20, 30, 40];

12Multiple Choice

(Conceptual) What is the primary difference between Class syntax in ES6 and older Prototype-based JS?

13Multiple Choice

(Scenario-Based) Which method is used to manually set the context of this in a function?

14Multiple Choice

(Conceptual) What is the "Temporal Dead Zone" (TDZ)?

15Multiple Choice

(Scenario-Based) Why would a developer use a Generator Function (function*) instead of a standard function?

16Multiple Choice

(Conceptual) What does the WeakMap object provide?

17Multiple Choice

(Conceptual) What is the "Proxy" object in JS?

18Multiple Choice

(Conceptual) Which operator performs Short-Circuiting in an OR condition?

19Multiple Choice

(Code-Tracing) What is the value of x?

20Multiple Choice

(Comparison) What is the main benefit of Strict Mode ("use strict";)? script.js const val = null; const x = val ?? 'Default';