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

For 'Scope and closures' point out var x = y= z =10; puts y, z in global scope always. #60

Closed
adityapunjani opened this issue Feb 14, 2014 · 3 comments

Comments

@adityapunjani
Copy link
Contributor

Also explain why?

@getify
Copy link
Owner

getify commented Feb 14, 2014

Hmm... I can see it being mentioned in scope & closure, but I'm not sure. This was already a plan to handle in the grammar title, since it's actually a grammar issue more than a scope issue.

var x = y = 10;

// is the same as
var x = (y = 10);

// is the same as
y = 10;
var x = y;

@adityapunjani
Copy link
Contributor Author

Yes grammar would be the right place. It completely skipped my mind that the grammar title was in the pipeline!

@getify
Copy link
Owner

getify commented Feb 14, 2014

thanks for the heads up though! appreciate the reminder! :)

@getify getify closed this as completed Feb 14, 2014
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