CWMCodeWithMishu
HomeTutorialsLearnProductsBlogAboutContact
Let's Talk
CWMCodeWithMishu

Practical full-stack engineering, AI systems, open-source developer tooling, and real software lessons for modern developers and startups.

Learn

Start HereTutorials & Video CoursesDeveloper Notes & CheatsheetsLearning CurriculumsArticles

Build

VS Code ExtensionsWeb ApplicationsGitHub Repositories ↗Release Changelog

Business

Digital Services (WorldNote) ↗Engineering CapabilitiesProject InquiryAgency Email ↗

Legal

Privacy PolicyTerms of ServiceAbout AuthorNow StatusSetup & Uses

© 2026 CodeWithMishu. All rights reserved.

Engineered by Munish Kumar Sharma

Privacy PolicyTerms of ServiceRSS Feed
CODEWITHMISHU
Official Companion: CodeToCareer YouTube SeriesFree

Learn this written chapter step-by-step alongside the CodeToCareer series.

Watch on YouTube
Tutorials/JavaScript/Ch 1: Absolute Beginner: Variables, Data Types & Your First Script
Programming Languages

JavaScript (ES6+) — Beginner Fundamentals to Advanced V8 Mechanics

Track Progress17%
12 HoursLevel: All Levels
Chapter 1 of 6🟢 Beginner⏱️ 7 min read

Absolute Beginner: Variables, Data Types & Your First Script

Zero coding experience needed. Learn how JavaScript makes websites interactive, what variables (let, const) are, and write your first script.

👶 Beginner Primer (Explain Like I'm 5):

A variable in JavaScript is like a labeled storage box: you stick a label on it ('let age = 22'), put a value inside, and whenever you need it later, you look up the box by its label.

Welcome to JavaScript! The Brain of the Web

If HTML is the structure and CSS is the style, JavaScript is the brain that gives a website life! When you click a button, open a menu, add items to a cart, or fetch data, JavaScript is running behind the scenes.

1. Storing Information in Variables (const & let):

In modern JavaScript, you store data using const or let:

  • ●`const` (Constant): Use this for values that will NOT change. (Default choice!)
  • ●`let`: Use this only for values that will change (like a counter or score).
javascript
const creatorName = "Munish"; // Text (String)
let totalInstalls = 10400;    // Number
const isFreeTool = true;      // True/False (Boolean)

totalInstalls = totalInstalls + 1; // Updated!

2. Printing Output with console.log():

To see what your code is doing, you use console.log():

javascript
console.log("Hello, my name is", creatorName);
Intuitive Mental Model

Think of console.log like a walkie-talkie: it beams messages from your code directly into the developer console so you can see what is happening.

Engineering Pro-Tips
  • ✓Always default to const. Only use let when you know the variable needs to be reassigned.
  • ✓Never use legacy 'var' — it has quirky scoping rules that cause subtle bugs.
Junior Pitfalls & Anti-Patterns
  • ✕Trying to reassign a const variable (e.g. const x = 5; x = 10; throws TypeError).