Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IF statements returning values #909

Closed
gfwilliams opened this issue Aug 30, 2016 · 2 comments
Closed

IF statements returning values #909

gfwilliams opened this issue Aug 30, 2016 · 2 comments

Comments

@gfwilliams
Copy link
Member

http://forum.espruino.com/conversations/291954

Looks like IF statements should return the value of the statement they executed - currently they return undefined

@muet
Copy link
Contributor

muet commented Aug 30, 2016

...the last one, if it is a block? ...similar to: last one's result is on top of 'stack'...

@gfwilliams
Copy link
Member Author

It would seem so, yes... it seems like it'd be a struggle to use it for much (and you should probably use ternary instead) but I guess it's part of the spec so needs implementing :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants