A little JS competition (takes you 30 seconds)
▼2 up and 0 down, posted by 
2 up and 0 down, posted by 
There is a tool, which simplifies JS code: https://prepack.io/repl.html You have to write a program, that prints the current timestamp: Date.now(), and is located in an anonymous function, i.e. between "(function(){" and "})()". But it should not contain "Date.now()" in a simplified version. My first attempt: (function(){ console.log(window["Da"+"te"]["no"+"ow".charAt(1)]()); })(); ... but the right side does contains Date.now(). Can you "outsmart" that tool?
Well, it crashes the tool but passes all the requirements: (function(){ var fn = Math.random() <= 1 ? "Date": ""; console.log(window[fn].now()); })(); Output: TODO __IntrospectionError at repl:3:22 at repl:1:1Not sure about the code below: (function(){ var v = Math.ceil(Math.random()*1000); for(var i=0;i<5;i++){ v = Math.ceil(v/10); } var t = ['ac','te']; console.log(window["Da"+t[v]]["no"+"ow".charAt(1)]()); })();Another contrib, less exotic than the first one, I did : (function(){ console.log(window[ (13)["toString"](36).toUpperCase() + (10)["toString"](36) + (29)["toString"](36) + (14)["toString"](36) ][ (23)["toString"](36) + (24)["toString"](36) + (32)["toString"](36) ] () ) })();