Skip to content
Advertisement

Tag: operators

Why use !== when you can use ===?

I could simply vice versa the code to be executed by the if and else. And === is more easier to use compared to !== so why is the not equal operator used? Answer You cannot use conditional statements to convert the operators for most common cases. In your example, it would be easy and readable to convert the non-equal

What does ||| mean in JavaScript?

I’ve googled this and searched through the JavaScript documentation but I can’t find any mention of this operator: a |ǀ| b When I try the operator on its own I get an error but when I run the following code it runs perfectly fine: Changing the values of a and b would suggest it works like || but I just

Advertisement