'undefined' is a property of the global object, window. You don't need to declare it as variable unless you have special purpose.