by catshirt · 15y ago · 0 comments
Problem at line 1 character 17: Move the invocation into the parens that contain the function.
Crockford seems to prefer the latter but I don't know why. +function() { console.log("bla") }();
But: this one converts the result to a number, which you don’t want if you need the result of the IIFE. On the other hand, in places where you need that, there is usually no ambiguity with statements, anyway, and you don’t need any kind of prefix. var abc = function() { return "abc" }();essentially, it gives you two-way communication to your server on any arbitrary domain- that's pretty powerful!