SGShabrez Ginshabrezdev.hashnode.dev·Jul 20, 2023 · 3 min readDifferences Between forEach() and map()Every Javascript developer should know the difference between forEach() and map(). The points to be noted: When to use either forEach() and map() Performance speed The ability of chaining process Syntax: forEach(): forEach((currentElement, index...00
SGShabrez Ginshabrezdev.hashnode.dev·Mar 10, 2023 · 1 min readDifference between == VS ===const Num1 = 1; const Num2 = 1; console.log(Num1 == Num2); //output is true console.log(Num1 === Num2); // output is true 💡 Now you will say, What’s new in this!!!! **const Num1 = 1; const string = “1”; // string is here console.log(Num1 == Num2); ...00
SGShabrez Ginshabrezdev.hashnode.dev·Mar 10, 2023 · 2 min readType Error / Reference Error💡 Getting Struck while coding, So, I am here to explain to you*.* The error makes you fed up with coding. Wanna quit coding? HELLO!!! DON'T DO IT. YOU ARE MISSING FUN😁😁😁….. TYPE ERROR const num = 123 num.toUpperCase() // throws Type error ...00
SGShabrez Ginshabrezdev.hashnode.dev·Mar 9, 2023 · 3 min read.reduce method in JavaScriptLet’s start with .reduce inBuilt function. The Reduce() method uses the reducer function that iterates through each element in the array and returns the single input ***Syntax arr.reduce(callback(accumulator, currentValue), initialValue)*** Let’s s...00
SGShabrez Ginshabrezdev.hashnode.dev·Mar 9, 2023 · 3 min read.Find method in JavaScriptLet’s start with .find inBuilt function. The find () method is used to iterate through the array and complete the find conditioned function by creating a new array, without changing the given parameter Array *//Syntax arr.find(callback(currentValue)...00