This project is read-only.

Illegal return statement

May 10, 2012 at 8:36 AM

We have started to evalute this great project. An we love how fast it is. But for me it is strange that the following statement doesn't work.

if(1 == 1) return true;
return false;

If I try it I get "SyntaxError: Illegal return statement.

Isn't it possible to use return statements? It feels like a big dissadvantage to me.

May 10, 2012 at 9:40 AM
I got It actully thanks to that had a better error message "Return statements are only allowed inside functions"

So now i run this statement first

function f()
if(1==1)return true;
return false;
and then I run