Answer the question
In order to leave comments, you need to log in
How to make Javascript more strict?
Javascript, without the slightest indignation, swallows such constructions, for example:
if(…){
this.value===value;//вместо =
}
someObject[undefined]=value;//создаёт текстовый ключ "undefined"
let x=1/0;
Answer the question
In order to leave comments, you need to log in
As an option
Or any other implementation of JSHint.
Depending on the settings, the IDE can highlight such things for you.
Learn to write normally, all of the listed options are absolutely correct from the point of view of javascript and can be used
this.value===value; - quite a normal expression, it even has a result - true or false, it is clear that in such use it does not carry a load
someObject[undefined]=value; - although this is obvious shit code, nevertheless String(undefined) === 'undefined'
let x=1/0; - x will be equal to Infinity
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question