Recently a coworker showed this fragment of JavaScript code:
greet = "".toString.bind("hello world!")
If you paste this inside the Developer Console and execute it will print a "Hello, World!" message:
>> console.log(greet())
hello, world!
Another interesting thing I found is that if you paste the same greet
code inside Node.js REPL it will automatically transpile it to a "readable" format.
How does this work? Why is this behaviour possible in a browser and why does Node.js automatically format it?