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

Review articles from 1st to 21st #104

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add backtick and lowercase initial
these are very nitpicky modifications
  • Loading branch information
borntofrappe authored Oct 9, 2019
commit 9e29dd806f1182c9fd9db575e915aa3f8515f97d
4 changes: 2 additions & 2 deletions 05 - Is var Dead? What should I use?.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
We've learned about `let` and `const` — what they do, and how they're scoped. We also know when they can be reassigned and when they cannot, but there's a question: What Should I actually use?
We've learned about `let` and `const` — what they do, and how they're scoped. We also know when they can be reassigned and when they cannot, but here's a question: What should I actually use?

That's a bit of a hot topic in the community right now, because some people prefer to still use `var`. Some people are saying, "var is dead!" Some say, "Use `let`." while others always use `const`.

Expand All @@ -14,7 +14,7 @@ Later on in the article he talks about `let` vs. `const`...
> * Use `let` only if rebinding is needed.
> * `var` should not be ever used in ES6.

Whenever you make a variable, assume it's `const`. Only use `let` if you need to update the value of the variable. You can use `const` to keep it the same value, but be warned that const is not about immutability. It is possible to modify the properties of an object declared through const .
Whenever you make a variable, assume it's `const`. Only use `let` if you need to update the value of the variable. You can use `const` to keep it the same value, but be warned that const is not about immutability. It is possible to modify the properties of an object declared through `const`.

[Another popular opinion here is from Kyle Simpson](http://blog.getify.com/constantly-confusing-const/), who also writes a whole bunch of awesome JavaScript books.

Expand Down