'! function in javascript?
I apologize for my stupid question, I am not good at javascript and angularjs. I've been referencing the code of some projects, and I'm really confused about this, what it actually is !function(a,b,c){}(x,y,z). I have never seen it before. I am not good at javascript nor angularjs. Thanks for all the help!
!function (e, n, t) {
"use strict";
// code
}(window, angular, jQuery)
Solution 1:[1]
it just simply tell the js to ignore this function and
it make it undefined Like This:
function Demo(){
console.log('log something');}
OutPut Will Be :
log something
But If You Put A ! Before The Function The Result Would Be:
Demo is not defined
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | GitLover |
