Nullish coalescing and optional chaining Explained!In JavaScript, there are two operators - nullish coalescing and optional chaining. Nullish coalescing is used to check whether a value is nullish or not. The Optional Chaining Operator is there to safely call upon a variable or function without knowi...Feb 24, 2023 路 2 min readsudipta26.hashnode.dev
Anonymous function in JavaScriptAnonymous function is a function that does not have any name associated with it. Normally we use the function keyword before the function name to define a function in JavaScript, however, in anonymous functions, we use only the function keyword witho...Feb 13, 2023 路 3 min readsudipta26.hashnode.dev
Difference Between "==" and "===" in javaScriptThe equality operator in javascript is used to compare if two values are equal. The comparison is made by == and === operators in javascript. Double Equal (==) Operator: The double equal('==') operator tests for abstract equality i.e it does the type...Feb 12, 2023 路 4 min readsudipta26.hashnode.dev
TypeError vs ReferenceErrorErrors occur when the JavaScript engine is parsing a script and encounters syntactically invalid code. JavaScript will throw an exception (throw an error). JavaScript will create an Error object with two properties: name and message. Let's look at tw...1KFeb 12, 2023 路 3 min readsudipta26.hashnode.dev
Why console.log() returns undefined?console.log() is a function. A function must always return some value to the caller. It's a ground rule. If a return value is not specified, then the function will return undefined*.* For example, see the below code. function addOneTo(a) { const ...Feb 12, 2023 路 1 min readsudipta26.hashnode.dev