like
function myFunction(){
var undefined = \"abc\";
}
If its possible then how to restrict not to allow that?
Some browsers allow it, the best way to restrict it is avoiding it.
But... some are using this technique to preserve the undefined:
(function(undefined){
})()
They get a variable called undefined
but don't pass a value which gives undefined
the undefined
value.
From jQuery's source code:
(function( window, undefined ) {
...
...
})(window);