JavaScript plus sign in front of function expression

It forces the parser to treat the part following the + as an expression. This is usually used for functions that are invoked immediately, e.g.: +function() { console.log(“Foo!”); }(); Without the + there, if the parser is in a state where it’s expecting a statement (which can be an expression or several non-expression statements), the … Read more