JavaScript Tutorial - Variables & Data Types

Unlock Premium Features: AI explanations (Hinglish), Indian voice & Videos
Sign Up Free

๐Ÿ“ฆ Variables - Data Store Karo

๐ŸŒŸ Real Life Analogy:

Variable = Storage box

๐Ÿ“ฆ Box hai โ†’ Variable
๐Ÿท๏ธ Box ka label โ†’ Variable name
๐Ÿ“ Box mein rakhi cheez โ†’ Value

Example: let age = 25;
"age" naam ka box hai, usmein "25" rakha hai

๐ŸŽฏ Variable Declaration

KeywordMeaningCan Change?When to Use
letModern wayโœ… YesNormal variables
constConstantโŒ NoFixed values (PI, config)
varOld wayโœ… YesโŒ Avoid (outdated)

๐Ÿ“Š Data Types

Common Types
TypeExampleReal Life
Number25, 3.14, -10Age, price, temperature
String"Hello", 'World'Name, email, message
Booleantrue, falseLogged in? Yes/No
Array[1, 2, 3]Shopping list
Object{name: "Rohan"}User profile

โš ๏ธ Naming Rules:

  • Start with letter, $, or _
  • No spaces (use camelCase)
  • Case sensitive: age โ‰  Age

๐Ÿค– AI Tutor Unlock Karo!

Apni language mein coding seekho - Hindi, Marathi, Gujarati aur 10+ Indian languages mein!

  • Hinglish mein explanations
  • Real-life examples
  • Beginner-friendly
Free Signup Karo

Example

let name = "Rohan";
let age = 25;
const PI = 3.14;
console.log(name);