Why JavaScript? The Language of the Web

JavaScript কেন শিখবেন — ওয়েবের একমাত্র ভাষা

Read: ~25 min Beginner 5 practice problems Live in-browser runner

1. Before We Begin — What Is JavaScript?

JavaScript is the programming language that runs in every web browser on Earth. When you click a button on Facebook, when bKash shows a balance, when Google's homepage suggests a search — that interactivity is JavaScript. It is the only programming language a browser understands natively, which is why it has become the most widely deployed language ever made.

JavaScript হলো এমন একটি প্রোগ্রামিং ভাষা যা পৃথিবীর প্রতিটি web browser-এ চলে। আপনি Facebook-এ কোনো বাটনে ক্লিক করলে, bKash যখন balance দেখায়, Google যখন search সাজেশন দেয় — সব কিছুই JavaScript-এর কাজ। ব্রাউজার একমাত্র এই ভাষাটি সরাসরি বুঝতে পারে — তাই এটি বিশ্বের সবচেয়ে বহুল ব্যবহৃত প্রোগ্রামিং ভাষা।

JavaScript started as a "scripting" language for buttons and form validation in 1995, but in 2026 it powers full applications — entire websites, mobile apps, desktop apps (Slack, VS Code, Discord), and even servers (Node.js).

2. A Short History of JavaScript

In May 1995, Netscape — the company that built the first popular web browser — needed a way to make web pages interactive. They hired Brendan Eich, who designed the language in just 10 days. It was originally called Mocha, then LiveScript, and finally JavaScript — a marketing name riding on Java's popularity at the time.

১৯৯৫ সালের মে মাসে Netscape (প্রথম জনপ্রিয় web browser-এর কোম্পানি) চেয়েছিল ওয়েব পেজকে interactive করতে। তাঁরা Brendan Eich-কে নিয়োগ দেন, যিনি মাত্র ১০ দিনে এই ভাষাটি ডিজাইন করেন। প্রথমে এর নাম ছিল Mocha, পরে LiveScript, এবং সবশেষে Java-এর জনপ্রিয়তার সুযোগ নিয়ে নাম রাখা হয় JavaScript — যদিও Java এবং JavaScript সম্পূর্ণ ভিন্ন।
Common confusion JavaScript is not related to Java. The name was a marketing decision. Java is to JavaScript what "ham" is to "hamster" — they share letters, nothing more.

Today JS is standardized as ECMAScript. New features land every year: ES6 (2015) brought let/const, classes, modules, arrow functions; ES2020 brought optional chaining; ES2024 brought top-level await and grouping. The language we'll learn is modern ES2024.

1995JS born 1997ES1 standard 2009Node.js 2015ES6 / ES2015 2020ES2020 2024ES2024 Figure 1.1 — JavaScript-এর সংক্ষিপ্ত ইতিহাস ও মাইলফলক।

3. JS Engines — How Your Code Actually Runs

JavaScript itself is just a specification (a document). To actually run JS, you need a JS engine — a real program written in C++ that reads your JavaScript and executes it. The four major engines:

  • V8 — Google. Powers Chrome, Edge, Node.js, Deno, Bun.
  • SpiderMonkey — Mozilla. Powers Firefox.
  • JavaScriptCore — Apple. Powers Safari and iOS.
  • Chakra — Microsoft (legacy). Powered old Edge before it switched to V8.
JavaScript নিজে শুধু একটি specification। আসল কাজ করে JS engine — যা C++-এ লেখা একটি program। চারটি প্রধান engine — V8 (Google), SpiderMonkey (Firefox), JavaScriptCore (Safari), এবং পুরোনো Chakra (Microsoft)।

Modern engines do just-in-time (JIT) compilation: they parse your JS, profile which functions are "hot," and compile those into machine code on the fly. This is why modern JS is shockingly fast — often within 2× of C in many benchmarks.

4. Your First JavaScript — Run It Live 🚀

Below is a tiny JS program. Click Run ▶ — your browser will execute it instantly, because every browser already has a full JS engine built in. No installation needed.

নিচে একটি ছোট JS প্রোগ্রাম দেওয়া হলো। Run ▶ বাটনে ক্লিক করলে আপনার ব্রাউজার সরাসরি এটি চালাবে — কোনো ইনস্টল লাগবে না, কারণ প্রতিটি ব্রাউজারেই JS engine আগে থেকেই থাকে।
hello.js
// Your first JavaScript program
const name = "Bangladesh";
console.log(`Hello, ${name}!`);
console.log("হ্যালো বাংলাদেশ!");

const year = new Date().getFullYear();
console.log(`The year is ${year}.`);
Anatomy — প্রতিটি অংশের কাজ
PieceMeaningবাংলায়
const name = "..."Declares a constant variable holding the string.একটি constant variable ঘোষণা করে যা string ধারণ করে।
console.log(...)Prints to the browser's developer console.ব্রাউজারের developer console-এ লেখা প্রিন্ট করে।
`...${x}...`Template literal — embeds a value inside a string.String-এর ভেতরে variable বসানোর সবচেয়ে সহজ উপায়।
new Date().getFullYear()Creates a Date object and asks for the year.একটি Date object তৈরি করে এবং সেটি থেকে year বের করে।
;Optional statement terminator (recommended).statement শেষ করার চিহ্ন (ঐচ্ছিক হলেও ব্যবহার করা ভালো)।

5. Where JavaScript Lives Today (JavaScript আজ কোথায়)

Every Web Browser
Chrome, Firefox, Safari, Edge — সব ব্রাউজারে।
Node.js Servers
Netflix, Uber, LinkedIn, PayPal — সবাই Node ব্যবহার করে।
Mobile Apps
React Native, Ionic, Capacitor — JS দিয়ে native app।
Desktop Apps
VS Code, Slack, Discord, Figma — সব Electron-এ।
IoT & Embedded
Espruino, Johnny-Five, Tessel — sensor ও robot-এ।
AI Tooling
LangChain.js, TensorFlow.js — AI app-এর frontend।

6. The Trade-offs — JS Is Not a Free Lunch

✅ What JS Gives You (যা পাবেন)

  • Runs everywhere — no install needed
  • Massive ecosystem (npm has 2M+ packages)
  • One language for frontend + backend
  • Async-friendly by design
  • Huge job market

⚠️ What JS Asks of You (সতর্কতা)

  • Loose typing — easy to make silly bugs
  • Many ways to do the same thing
  • Browser quirks & legacy baggage
  • Can be slow if used carelessly
  • The ecosystem changes fast
Key insight JavaScript is uniquely powerful because it is the only language guaranteed to run on every user's device — without asking permission, without installation, without even Wi-Fi after the first load.

JavaScript-এর এমন এক বিশেষত্ব আছে — এটি প্রতিটি user-এর device-এ স্বয়ংক্রিয়ভাবে চলে। কোনো permission, install বা Wi-Fi লাগে না। এই কারণেই এটি এত শক্তিশালী।

7. Glossary (শব্দকোষ)

TermMeaningবাংলায়
ECMAScriptThe official spec that JS implements.JavaScript-এর সরকারি specification বা মান।
EngineThe C++ program that runs JS (e.g., V8).JavaScript চালানোর জন্য C++-এ লেখা প্রোগ্রাম, যেমন V8।
RuntimeEngine + extra APIs (browser DOM, Node fs, etc.)Engine + অতিরিক্ত API (browser-এ DOM, Node-এ fs ইত্যাদি)।
ConsoleThe DevTools panel where console.log shows up.Browser-এর DevTools-এ console.log যেখানে দেখা যায়।
JITJust-in-time compilation — compiling hot code on the fly.সক্রিয় কোডকে দ্রুত machine code-এ রূপান্তর করার কৌশল।

8. Practice Problems

Every problem has a Show Answer button. The answer contains real JS code that you can run right here in the browser. Try the problem yourself first, then check.

প্রতিটি প্রশ্নের সাথে Show Answer বাটন দেওয়া আছে। উত্তরে একটি runnable JS কোড আছে, যা আপনি সরাসরি এই পেজেই চালিয়ে দেখতে পারবেন।
  1. Write a program that prints your name and your favorite browser using console.log.
    আপনার নাম এবং প্রিয় ব্রাউজারের নাম console.log দিয়ে প্রিন্ট করুন।
    ✨ Show Answer (উত্তর দেখুন)
    ans1.js
    const name = "Arif Hossain";
    const browser = "Firefox";
    console.log(`Name: ${name}`);
    console.log(`Browser: ${browser}`);
  2. Print three lines describing the year, month, and day using a single Date object.
    একটি Date object থেকে year, month এবং day আলাদা তিন লাইনে প্রিন্ট করুন।
    ✨ Show Answer (উত্তর দেখুন)
    ans2.js
    const now = new Date();
    console.log(`Year: ${now.getFullYear()}`);
    console.log(`Month: ${now.getMonth() + 1}`);
    console.log(`Day: ${now.getDate()}`);

    মনে রাখবেন: getMonth() 0 থেকে শুরু হয়, তাই +1 করতে হয়।

  3. Explain in 3 sentences why JavaScript runs in every browser but Python does not.
    তিন বাক্যে ব্যাখ্যা করুন — JavaScript প্রতিটি ব্রাউজারে চললেও Python কেন চলে না।
    ✨ Show Answer (উত্তর দেখুন)

    Answer: (1) JavaScript was designed in 1995 specifically to run inside web browsers, so every browser ships with a built-in JS engine. (2) Python was designed earlier as a general-purpose language for desktops, with no native browser integration. (3) For Python to run in a browser today, you need extra tools like Pyodide (a WebAssembly port) — JavaScript needs nothing at all.

    (১) JavaScript ১৯৯৫ সালে browser-এ চালানোর জন্যই তৈরি, তাই প্রতিটি browser-এর সাথে JS engine আগে থেকেই থাকে। (২) Python আগে থেকে desktop-এর জন্য তৈরি, browser-এর সাথে এর কোনো native integration নেই। (৩) Browser-এ Python চালাতে এখনো Pyodide-এর মতো অতিরিক্ত tool লাগে — JavaScript-এর সেটা লাগে না।

  4. Write a program that prints the total number of seconds in one week.
    এক সপ্তাহে মোট কত সেকেন্ড — সেটি প্রিন্ট করার একটি প্রোগ্রাম লিখুন।
    ✨ Show Answer (উত্তর দেখুন)
    ans4.js
    const secondsPerWeek = 7 * 24 * 60 * 60;
    console.log(`One week has ${secondsPerWeek} seconds.`);

    Output: One week has 604800 seconds.

  5. In one paragraph, explain who Brendan Eich is and why his work matters.
    একটি অনুচ্ছেদে ব্যাখ্যা করুন — Brendan Eich কে এবং তাঁর অবদান কেন গুরুত্বপূর্ণ।
    ✨ Show Answer (উত্তর দেখুন)

    Answer: Brendan Eich is an American computer scientist who designed JavaScript in 10 days in May 1995 while working at Netscape. JavaScript went on to become the dominant language of the web, with billions of devices running it every second. Without Eich's quick, pragmatic design, the modern interactive web — and ultimately Node.js, React, and most of frontend tooling — would not exist.

    Brendan Eich একজন আমেরিকান কম্পিউটার বিজ্ঞানী, যিনি ১৯৯৫ সালের মে মাসে Netscape-এ কাজ করার সময় মাত্র ১০ দিনে JavaScript তৈরি করেন। পরবর্তীতে এটি ওয়েবের প্রধান ভাষা হয়ে ওঠে এবং বর্তমানে কোটি কোটি device-এ প্রতি মুহূর্তে চলছে। তাঁর তৈরি এই ভাষা ছাড়া আজকের interactive web, Node.js, React এবং frontend tooling-এর অস্তিত্বই থাকতো না।

Summary — Module 01

JavaScript is an interpreted, JIT-compiled, multi-paradigm language designed in 10 days in 1995 by Brendan Eich. It is standardized as ECMAScript and runs in every browser, on servers via Node.js, on desktops via Electron, and on mobile via React Native. It is the only language with native browser support — and that single fact has made it the most reachable programming language ever made.

JavaScript একটি interpreted, JIT-compiled, multi-paradigm ভাষা, যেটি Brendan Eich ১৯৯৫ সালে মাত্র ১০ দিনে তৈরি করেন। এটি ECMAScript standard-এ লেখা হয় এবং প্রতিটি browser-এ, Node.js-এর মাধ্যমে server-এ, Electron-এর মাধ্যমে desktop-এ এবং React Native-এর মাধ্যমে mobile-এ চলে। এটিই একমাত্র ভাষা যা প্রতিটি browser-এ native-ভাবে সমর্থিত — এই একটি কারণেই এটি পৃথিবীর সবচেয়ে সর্বব্যাপী ভাষা।

Next Module → Setting Up: Browser Console, Node.js & VS Code — যেখানে আপনি পেশাদার পরিবেশ সেটআপ শিখবেন।