like
function myFunction(){ var undefined = \"abc\"; }
If its possible then how to restrict not to allow that?
Yes it is possible to overwrite undefined.
This question has good solutions for working around that problem - How to check for "undefined" in JavaScript?