📲 Download Utility Tools Apps

EMI Calculator

Download EMI Calculator

SOA Games

Download SOA Games

SOA Technology App

Download SOA Technology

BMI Checker

Download BMI Checker

Task Jira

Download Task Jira

Laughing Adda

Download Laughing Adda

📅 हिंदी कैलेंडर ऐप डाउनलोड करें

Download Shubhcalendar App

2️⃣ JavaScript Basics

🔹 1. Variables

Variables are used to store data.

✅ var

  • Old way to declare variables
  • Function-scoped (not block-scoped)
var name = "Aditya";

✅ let

  • Modern way (recommended)
  • Block-scoped
  • Value can be changed
let age = 25;
age = 30;

✅ const

  • Block-scoped
  • Value cannot be reassigned
const pi = 3.14;

🔹 2. Data Types

📌 String

Text values

let name = "Aditya";

📌 Number

Numbers (integer or decimal)

let marks = 95;
let price = 99.99;

📌 Boolean

True or False

let isLogin = true;

📌 Undefined

Variable declared but not assigned

let x;

📌 Null

Empty value (intentionally)

let data = null;

📌 Object

Collection of key-value pairs

let user = {
name: "Aditya",
age: 25
};

📌 Array

List of values

let fruits = ["Apple", "Banana", "Mango"];

🔹 3. Operators

➕ Arithmetic Operators

Used for calculations

let a = 10;
let b = 5;console.log(a + b); // 15
console.log(a - b); // 5
console.log(a * b); // 50
console.log(a / b); // 2

🔍 Comparison Operators

Compare values (returns true/false)

console.log(10 == "10");   // true (loose)
console.log(10 === "10"); // false (strict)
console.log(10 > 5); // true

🔗 Logical Operators

Used with conditions

let age = 20;console.log(age > 18 && age < 30); // true
console.log(age > 18 || age < 10); // true
console.log(!(age > 18)); // false

📝 Assignment Operators

Assign values

let x = 10;
x += 5; // x = x + 5 → 15
x -= 2; // 13

🔹 4. Type Conversion

📌 Convert to String

let num = 100;
String(num); // "100"

📌 Convert to Number

let str = "50";
Number(str); // 50

📌 Convert to Boolean

Boolean(1); // true
Boolean(0); // false

🧪 Practice Programs

✅ 1. Calculator Program

let a = 10;
let b = 5;console.log("Add:", a + b);
console.log("Subtract:", a - b);
console.log("Multiply:", a * b);
console.log("Divide:", a / b);

👉 Advanced (User Input)

let num1 = Number(prompt("Enter first number:"));
let num2 = Number(prompt("Enter second number:"));alert("Sum = " + (num1 + num2));

✅ 2. Temperature Converter

Celsius to Fahrenheit

let c = 30;
let f = (c * 9/5) + 32;console.log("Fahrenheit:", f);

Fahrenheit to Celsius

let f = 86;
let c = (f - 32) * 5/9;console.log("Celsius:", c);


AI Spiritual Tools & Interactive Experiences

Explore powerful AI-driven tools for daily guidance, spirituality, fun quizzes, and self-discovery.

Today’s Quote

Get inspiring daily quotes powered by AI to motivate and guide your day.

Explore Now

AI Tarot Card Reader

Reveal insights about your future, love, and career with AI tarot readings.

Read Tarot

Love Match Calculator

Check compatibility and love predictions using AI-based analysis.

Check Match

Fortune Cookie

Open an AI fortune cookie and receive wisdom, luck, and fun messages.

Open Cookie

Quiz Categories

Engage with knowledge-based and fun quizzes across multiple categories.

Start Quiz

Panchang Calendar

View daily Panchang, auspicious timings, tithi, nakshatra, and festivals.

View Panchang

Online Numerology

Discover your destiny number, life path, and numerology predictions.

Calculate Now

Spiritual Feeds

Stay connected with spiritual thoughts, mantras, and divine content.

View Feeds

Quiz Hub

Attempt trending quizzes on GK, spirituality, festivals, and more.

Explore Quizzes