Internet Programming Laboratory

Unit 4: JavaScript Core & ES6+ Development

Variables, Data Types, Operators, Control Flow, Arrow Functions, Template Literals, Destructuring, Spread/Rest, Modules, Promises, Fetch API, async/await, JSON, Local Storage — the engine that makes the web interactive.

🏢 Industry-Aligned  |  📝 15 MCQs (Bloom's Taxonomy)  |  🔬 5 Lab Exercises  |  💼 Interview Prep

Section 1

Why This Chapter Matters in 2025

HTML gives you the skeleton. CSS gives you the skin. JavaScript gives you the brain. Without JavaScript, every website is a static poster — no interactivity, no form validation, no dynamic content, no API calls, no user experience. JavaScript is the only programming language that runs natively in every browser on Earth.

In 2025, JavaScript isn't optional — it's the most used programming language in the world for the 12th year running (Stack Overflow Developer Survey). Every Indian tech company — TCS, Infosys, Wipro, Flipkart, Swiggy, CRED — requires JavaScript proficiency. React, Angular, Vue, Node.js, Next.js — all built on JavaScript.

🏢 Industry Connection — JavaScript Powers Everything

PhonePe — India's #1 payments app. Their entire web checkout flow — UPI ID validation, real-time payment status polling, QR code generation — runs on JavaScript. The fetch() API calls their backend 50 million times per day.

Swiggy — When you search for "biryani" and results appear instantly without page reload? JavaScript fetch() + async/await. When your cart total updates as you add items? JavaScript DOM manipulation. When your delivery ETA counts down? setInterval().

Razorpay — Their payment gateway SDK is 100% JavaScript. When a merchant integrates Razorpay, they write <script src="razorpay.js"> and call new Razorpay(options). ES6 modules, Promises, and async/await are the backbone.

🇮🇳 PhonePe🇮🇳 Swiggy🇮🇳 Razorpay🇮🇳 Flipkart🇮🇳 CRED🇮🇳 Zerodha

Prerequisite Checklist ✅

  • ✅ Completed Units 1–3 (HTML5 + CSS3 — you need a page to add JS to)
  • ✅ VS Code with the Live Server extension
  • ✅ Chrome DevTools — you'll live in the Console tab this entire unit (press F12 → Console)
  • ✅ Basic understanding of programming concepts (variables, conditions, loops) from any language
JavaScript was created in just 10 days by Brendan Eich at Netscape in 1995. Despite the name, it has nothing to do with Java — the name was a marketing decision. Today it runs on 98% of all websites and powers server-side code (Node.js), mobile apps (React Native), and even desktop apps (Electron — VS Code is built with it).
Section 2

Learning Outcomes — Bloom's Taxonomy

Bloom's LevelLearning Outcome
L1 — RememberRecall the syntax for let/const/var, data types, operators, control flow structures, and ES6 features (arrow functions, template literals, destructuring)
L2 — UnderstandExplain the difference between == and ===, block vs function scope, synchronous vs asynchronous execution, and how Promises work
L3 — ApplyWrite JavaScript programs using ES6+ syntax: arrow functions, destructuring, spread/rest, template literals, fetch() with async/await, and localStorage
L4 — AnalyzeDebug JavaScript code using Chrome DevTools — identify scope issues, type coercion bugs, and async timing errors
L5 — EvaluateCompare callbacks vs Promises vs async/await for handling asynchronous operations and justify which pattern to use
L6 — CreateBuild a complete interactive web application using JavaScript ES6+ with API integration, form validation, and persistent storage