In twitter bootstrap source code I found the following:
!function ($) {
"use strict"; // jshint ;_;
I've never met such a construction before. What does it mean? It looks like IIFE, but I am not sure it is the equivalent.
In twitter bootstrap source code I found the following:
!function ($) {
"use strict"; // jshint ;_;
I've never met such a construction before. What does it mean? It looks like IIFE, but I am not sure it is the equivalent.
It turns it into an expression, usually followed by ()
. It saves a byte over using parentheses, at the cost of wasting about a hundred StackOverflow questions.