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
Tag: operators
Is there an easy way to change one value in a nested json data with TypeScript?
TypeScript version: ^3.5.3 For this json It can be changed to a new title with spread syntax as The final newConfig data will be But in this case Also want to change title’s value. Tried It will break the pre-defined json schema: So is there an easy way to overwrite only one item in this kind of json? Answer
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