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

Variable scopes #27

Open
wolfgang42 opened this issue Oct 10, 2018 · 0 comments
Open

Variable scopes #27

wolfgang42 opened this issue Oct 10, 2018 · 0 comments
Labels
good first issue Good for newcomers ready Ready for development
Milestone

Comments

@wolfgang42
Copy link
Owner

Currently rockstar-js treats all varables as global. Per spec:

If a variable is defined outside of a function, it is in global scope. Global scope variables are available everywhere below its first initialization. If a variable is defined inside of a function, it is in local scope. Local scope variables are available from their initialization until the end of the function they are defined in.

While within a function, if you write to a variable that has been defined in global scope, you write to that variable, you do not define a new local variable.

@wolfgang42 wolfgang42 added good first issue Good for newcomers ready Ready for development labels Oct 10, 2018
@wolfgang42 wolfgang42 added this to the Spec Complete milestone Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers ready Ready for development
Projects
None yet
Development

No branches or pull requests

1 participant