Daniel Engelhardthardnold.hashnode.dev·Jan 23, 2024Why you should use ?? instead of ||We often see and write things like this: function sayHey(name) { name = name || "Precious"; console.log(`Hey ${name}`); } sayHey("Morty"); //Hey Morty sayHey(); //Hey Precious But did you know that the ?? operator, known as the nullish coal...Discuss·2 likes·53 readsJavaScript
Diwakardiwakarkashyap.hashnode.dev·Jul 24, 2023Truthy and Falsy in JavascriptIn JavaScript, a truthy value is a value that is considered true when encountered in a Boolean context. All values are truthy unless they are defined as falsy (i.e., except for false, 0, -0, 0n, "", null, undefined, and NaN). Truthy values include: ...Discuss·10 likes·36 readsjavascript truthy and falsy
quizzesforyouquizzesforyou.hashnode.dev·Jun 30, 2023JavaScript Quiz #06 — Truthy and Falsy ValuesCheckout the interactive quiz https://quizzesforyou.com/quiz/jstruthyfalsy Checkout All JavaScript Quizzes In JavaScript, values can be classified as either truthy or falsy. Knowing which values are considered truthy or falsy allows you to write mor...Discuss·35 readsJavaScript Series - JavaScript Interview questions and answersJavaScript