A typical programming practice is to set your object variable as undefined at first, so that comparison becomes much simpler for that later in code. All you have to do is:
var foo = undefined;
....
if (foo===undefined) doSomething();
....
The same holds true when you return a function value, return either a boolean or undefined as a falsy value to avoid trouble latter.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
A typical programming practice is to set your object variable as
undefined
at first, so that comparison becomes much simpler for that later in code. All you have to do is:The same holds true when you return a function value, return either a boolean or undefined as a falsy value to avoid trouble latter.