how to not get an undefined array in js code example Example: js return undefined on ReferenceError window.console && console.log(new Date());