`是什么意思! function(...){...}(...);`?

时间:2018-07-24 16:30:26

标签: javascript

我对此功能感到困惑:

! function(e, t, n, c, r, a, i) {
    e.Newsletter2GoTrackingObject = r, e[r] = e[r] || function() {
        (e[r].q = e[r].q || [])
        .push(arguments);
    }, e[r].l = 1 * new Date, a = t.createElement(n), i = t.getElementsByTagName(n)[0], a.async = 1, a.src = c, i.parentNode.insertBefore(a, i);
}(window, document, "script", "https://static.newsletter2go.com/utils.js", "n2g");

在函数定义之前!的含义是什么,为什么在函数声明之外还有参数?我的意思是:(window, document, "script", "https://static.newsletter2go.com/utils.js", "n2g");

0 个答案:

没有答案