If you are using a modern browser (which supports javascript 1.8.5), using undefinedand void 0most likely the same ( as it undefinedbecomes unavailable for writing ), except that it voidcan take an expression as a parameter and evaluate it.
In older browsers (which do not support javascript 1.8.5). Better to use void 0. Take a look at this example:
console.log(undefined);
var undefined = 1;
console.log(undefined);
He will print
1
undefined . ( ). , undefined , as void - , javascript undefined. , fooobar.com/questions/804256/....
:
, , void 0.