JavaScript: Exclamation Before function

I come across JavaScript code like this today:


What does that !function mean?

Turns out, it is equivalent to this:


The exclamation makes the function a expression. (it's the boolean “not” operator.) People do this hack to save one character worth of source code file size. Silly.

Popular posts from this blog

11 Years of Writing About Emacs

does md5 creates more randomness?

Google Code shutting down, future of ErgoEmacs