Skip to content

(docs) Update #80

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

Open
wants to merge 1 commit into
base: src
Choose a base branch
from
Open

(docs) Update #80

wants to merge 1 commit into from

Conversation

sethbergman
Copy link

-(docs) A few minor updates to the documentation.
There's much to add, I will be happy to make additional contributions if necessary.

-(docs) A few minor updates to the documentation
Copy link
Member

@UltCombo UltCombo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

I've added a few comments to discuss, what do you think?

For real world applications, you'll need to use a traspiler (at least, for a while until mid 2015).
![let on firefox nightly](https://github.com/JSRocksHQ/jsrockshq.github.io/blob/master/img/let.gif)

* __NOTE__: As well pointed by Michał Gołębiowski on the comments below, browsers implementations are not fully aligned with the spec, so you may find some bugs.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is no longer accurate, I think we can remove this note.

There's no _hoisting_ behavior for variables declared with _let_.
With `let`, to declare variables is much more intuitive and consistent with a C-based language.
The use of `var` should be discouraged, and only _let_ var exist in use cases with legacy code. `let` and `const` will be the future of JavaScript declarations.
There's no _hoisting_ behavior for variables declared with _let_, which is another topic for later.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change _let_ to let like you did in other places, also perhaps we can add a link to the TDZ post?


![let on firefox nightly](/img/let.gif)
`__let__` is currently supported by the modern browsers (even IE11) in theirs last versions and [Traceur](https://github.com/google/traceur-compiler) as well.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Traceur seems discontinued, maybe we can replace it with Babel?

@sethbergman
Copy link
Author

Sorry for the delay, I've been super busy lately and just saw your notes. I will make the requested changes as soon as possible. 😃

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

Successfully merging this pull request may close these issues.

2 participants