If the following is passed into Google code closure:
return (function() {
return true;
})();
it says there is a parsing error due to invalid syntax. What could be the problem?
If the following is passed into Google code closure:
return (function() {
return true;
})();
it says there is a parsing error due to invalid syntax. What could be the problem?
If that is your entire code, the problem is that you can't have a return statement (the first one) outside a function definition. Try:
function foo() {
return (function() {
return true;
})();
}
return true;.