Posts

Showing posts from April, 2026

How to use reserved words in javascript?

In JavaScript, reserved words (keywords) are special words that have a predefined meaning in the language. Because of that, you cannot use them as variable names, function names, or identifiers . let if = 10;       // ❌ Error var class = "JS";  // ❌ Error function for() {}  // ❌ Error Common Reserved Words Some important keywords include: if , else for , while , do function , return var , let , const class , extends try , catch , finally switch , case , break new , this , typeof How to “use” reserved words correctly You don’t use them as names — instead, you use them for their intended purpose . 1. Using if (condition) let age = 18; if (age >= 18) {   console.log("Adult"); } 2. Using for (loop) for (let i = 0; i < 5; i++) {   console.log(i); } 3. Using function function greet() {   return "Hello!"; } Trick to Remember Reserved words = instructions for JavaScript , not names you create. Special Case (Advan...

Common Programming Notations

  1. Camel Case (camelCase) First word starts with lowercase, next words start with uppercase Very common in JavaScript, Java   2. Pascal Case (PascalCase) Every word starts with uppercase Often used for classes or components 3. Snake Case (snake_case) Words separated by underscores _ Common in Python  4. Kebab Case (kebab-case) Words separated by hyphens - Used in URLs, CSS classes 

What is Notation?

Notation  simply means a system of symbols, signs, or marks used to represent information in a clear and structured way. Notation is a way of writing things using symbols instead of long words . Examples 1. In Mathematics ( Mathematics ) “+” means addition “−” means subtraction “x²” means x multiplied by itself Instead of writing “x multiplied by x” , we write x² 2. In Music ( Music ) Musical notes like 🎵 represent sound and rhythm Example: ♩ ♪ ♫ 3. In Science ( Science ) “H₂O” represents water “NaCl” represents salt Why Notation is Important Makes communication short and clear Saves time and space Helps in universal understanding In One Line: Notation is a symbolic way of representing ideas, numbers, or information. What's Camel notation? Camel notation (also called CamelCase notation ) is a way of writing words without spaces , where each new word starts with a capital letter —just like the humps of a camel 🐫. Types of Camel Notation 1. Lower Camel Case (camelCase) First word...