PSPratham Shahintechsorcerer.hashnode.dev·Mar 15 · 9 min readJavaScript Operators: The Basics You Need to KnowWhat Are Operators? Operators perform operations on values. let sum = 5 + 3; // + is an operator They're symbols that tell JavaScript what to do with values. Think of operators as instructions: + →00
PSPratham Shahintechsorcerer.hashnode.dev·Mar 15 · 8 min readThe Magic of this, call(), apply(), and bind() in JavaScriptWhat is this? this = "Who called this function?" Simple as that. const person = { name: "Alice", greet: function() { console.log("Hello, I'm " + this.name); } }; person.greet(); // "Hello, 00
PSPratham Shahintechsorcerer.hashnode.dev·Mar 15 · 8 min readFunction Declaration vs Function Expression: What's the Difference?What Are Functions? You need to add two numbers multiple times in your code. Without functions: let result1 = 5 + 3; let result2 = 10 + 7; let result3 = 15 + 9; With a function: function add(a, b) { 00
PSPratham Shahintechsorcerer.hashnode.dev·Mar 15 · 8 min readJavaScript Arrays 101The Problem Arrays Solve You want to store names of 5 students. Without arrays: let student1 = "Alice"; let student2 = "Bob"; let student3 = "Charlie"; let student4 = "Diana"; let student5 = "Eve"; N00
PSPratham Shahintechsorcerer.hashnode.dev·Mar 15 · 8 min readUnderstanding Objects in JavaScriptWhat Are Objects? You want to store information about a person: Name: "Alice" Age: 25 City: "Mumbai" You could use separate variables: let name = "Alice"; let age = 25; let city = "Mumbai"; But 00