RSRishi Srivastavainsririshi.hashnode.dev·Jul 5, 2022 · 2 min readShallow and Deep copy in JavaScriptShallow Copy Shallow copy creates copy of an object. New copy has exact copy of values in original object. New copy refers to same reference as original object refers. Example: let obj = { name: "John", age: "25" }; let newObj = obj; newObj.n...00
RSRishi Srivastavainsririshi.hashnode.dev·Jan 12, 2022 · 3 min readReference & Type & Syntax ErrorIf you have been writing code more than "Hello World", you might have encountered with errors. It's not a pretty sight when program shows error. As a good developer you must know about error types. In this blog we will cover three most occurred erro...01P
RSRishi Srivastavainsririshi.hashnode.dev·Jan 10, 2022 · 1 min readNullish Coalescing Operator (??)Nullish coalescing operator is a logical operator. It returns right hand operand only if left hand operand is null or undefined. Syntax leftOperand ?? rightOperand Examples: const user = null ?? "user"; console.log(user); /* output: user */ const...01R
RSRishi Srivastavainsririshi.hashnode.dev·Sep 26, 2021 · 1 min readFirst-class Function in JavaScriptIn JavaScript functions are treated as First-class Function when a function can be assigned as a value to variable or it can be passed as arguments to other function or can be returned by another function. Example: Assign a function to variable const...00