Why 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...
hardnold.hashnode.dev3 min read