Understood. I'll structure it using the 80/20 (Pareto) principle—the smallest set of concepts that gives the biggest practical understanding of JavaScript.
JavaScript Chapters (No Topic Breakage)
JavaScript Introduction & Execution
Variables (
let,const,var)Data Types
Operators
Type Conversion & Coercion
Comparison Operators
Truthy & Falsy Values
Conditional Statements (
if,else,switch)Loops (
for,while,do...while)Functions
Scope
Hoisting
Closures
Arrays
Array Methods
Objects
Object Methods
Destructuring
Spread & Rest Operators
Template Literals
Strings
Numbers & Math
Dates
Error Handling (
try...catch)ES Modules
Callbacks
Promises
Async/Await
Timers (
setTimeout,setInterval)DOM Selection
DOM Manipulation
Events
Event Delegation
Forms
Local Storage & Session Storage
JSON
Fetch API
Classes
Prototypes
thisKeywordArrow Functions
Map
Set
WeakMap & WeakSet
Regular Expressions
Optional Chaining
Nullish Coalescing
Iterators & Generators
Symbols
BigInt
Performance Basics
Memory Management
Debugging
Modern JavaScript Best Practices
Chapter 1 — JavaScript Introduction & Execution
MCQ 1
You save this code in app.js.
console.log("Pizza Delivered");
Nothing appears on the screen after double-clicking the file.
What is the most likely reason?
A. JavaScript only works with HTML pages.
B. console.log() is broken.
C. JavaScript needs internet.
D. The file must be named main.js.
✅ Answer: A
MCQ 2
You write:
console.log("Order Received");
Where will this message normally appear?
A. Browser URL bar
B. Browser Console
C. Browser Address Bar
D. Task Manager
✅ Answer: B
MCQ 3
You open an HTML page.
<script>
console.log("Welcome");
</script>
When does JavaScript execute?
A. Only after clicking something
B. Immediately when browser reaches the script
C. After 10 seconds
D. Only after internet connects
✅ Answer: B
MCQ 4
A restaurant website loads.
JavaScript is responsible for:
A. Storing electricity
B. Making buttons interactive
C. Printing paper menus
D. Increasing internet speed
✅ Answer: B
MCQ 5
A webpage contains only HTML.
What happens?
A. The page can still display content.
B. Browser crashes.
C. JavaScript is automatically added.
D. CSS becomes mandatory.
✅ Answer: A
MCQ 6
Which language mainly controls webpage behavior?
A. HTML
B. CSS
C. JavaScript
D. SQL
✅ Answer: C
MCQ 7
Which statement is TRUE?
A. HTML adds interaction.
B. CSS stores database.
C. JavaScript makes webpages respond to user actions.
D. JavaScript replaces HTML.
✅ Answer: C
MCQ 8
A login button changes color when hovered.
Which technology is mainly responsible?
A. HTML
B. CSS
C. JavaScript
D. MySQL
✅ Answer: B
MCQ 9
A login button checks whether password is correct.
Which technology mainly performs this logic?
A. CSS
B. HTML
C. JavaScript
D. SVG
✅ Answer: C
MCQ 10
You write:
console.log("One");
console.log("Two");
console.log("Three");
Output order?
A.
Three
Two
One
B.
One
Two
Three
C.
Random
D.
Depends on browser
✅ Answer: B
MCQ 11
You write:
console.log("Morning");
alert("Breakfast");
console.log("Office");
Which statement is TRUE?
A. JavaScript skips alert.
B. Execution pauses until alert is closed.
C. alert runs last.
D. console.log waits forever.
✅ Answer: B
MCQ 12
A shopping website loads JavaScript.
Which is executed first?
console.log("A");
console.log("B");
console.log("C");
A. C
B. B
C. A
D. Random
✅ Answer: C
MCQ 13
You accidentally write:
Console.log("Hi");
Result?
A. Works normally
B. Error because JavaScript is case-sensitive
C. Browser converts automatically
D. Prints nothing silently
✅ Answer: B
MCQ 14
Which is the correct function?
A.
console.Log()
B.
Console.log()
C.
console.log()
D.
CONSOLE.LOG()
✅ Answer: C
MCQ 15
A webpage has this:
<script>
console.log("A");
</script>
<script>
console.log("B");
</script>
Output?
A.
B
A
B.
A
B
C.
Only A
D.
Only B
✅ Answer: B
MCQ 16
JavaScript executes code:
A. Bottom to top
B. Randomly
C. Line by line
D. Alphabetically
✅ Answer: C
MCQ 17
Which is NOT a common place to run JavaScript?
A. Browser
B. Node.js
C. Calculator
D. Browser Developer Tools
✅ Answer: C
MCQ 18
You press F12 in Chrome.
Why?
A. To increase internet speed
B. To open Developer Tools
C. To restart browser
D. To clear history
✅ Answer: B
MCQ 19
Where is JavaScript executed when using Chrome?
A. Inside the browser's JavaScript engine
B. Inside HTML tags only
C. Inside CSS
D. Inside Excel
✅ Answer: A
MCQ 20
You refresh a webpage.
JavaScript inside the page:
A. Runs again
B. Is deleted forever
C. Runs only once in lifetime
D. Needs manual installation
✅ Answer: A
MCQ 21
You write:
console.log("Payment Started");
console.log("Payment Successful");
If the first line runs successfully, the second line will:
A. Never run
B. Usually run immediately after the first
C. Run before the first
D. Run only after browser restart
✅ Answer: B
MCQ 22
JavaScript is mainly used to:
A. Paint walls
B. Add logic and interactivity
C. Design buildings
D. Store clothes
✅ Answer: B
MCQ 23
Which file extension is commonly used for JavaScript?
A. .java
B. .js
C. .javascript
D. .script
✅ Answer: B
MCQ 24
You create:
app.js
How do you connect it to HTML?
A.
<script src="app.js"></script>
B.
<link src="app.js">
C.
<javascript app.js>
D.
<js file="app.js">
✅ Answer: A
MCQ 25
Which statement best describes JavaScript execution?
A. Browser reads JavaScript instructions one by one and performs them in order unless instructed otherwise.
B. Browser guesses the entire program before running.
C. Browser executes the last line first.
D. Browser ignores JavaScript until CSS finishes.
✅ Answer: A
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.