4 ms·
I liked one of the responses to the SO thread: http://stackoverflow.com/questions/3755606/what-does-the-exclamation-mark-do-before-the-function http://stackover
by kyllo 12y ago
I liked one of the responses to the SO thread:
http://stackoverflow.com/questions/3755606/what-does-the-exclamation-mark-do-before-the-function http://stackoverflow.com/questions/3755606/what-does-the-exc...
!function () {}()
This will also return the boolean opposite of the return value of the function, in this case true, because !undefined is true. If you want the actual return value to be the result of the call, then try doing it this way:
(function () {})()
Why would you ever not want the actual return value of a function to be the result of calling that function?