Skip to content

Commit

Permalink
feat: improve wording about var
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Younger <[email protected]>
  • Loading branch information
NikitaRevenco and fortypercenttitanium authored Aug 21, 2024
1 parent 7ae0e97 commit e1e6b6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion foundations/javascript_basics/variables_and_operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ So in summary, there are two ways to declare a variable:
- `let`, which we can re-assign.
- `const` which we **can't** re-assign and will throw an error if we try.

There is also a third way - using `var`. It's similar to `let`, but it is the old way and should **not** be used. However, you will likely come across code which uses `var`, so it is useful to know that it exists. Do not worry too much about it for now.
There is also a third way, `var`, which was the original way variables were declared in JavaScript. `var` is similar to `let` in that variables assigned this way can be reassigned, but it has other quirks that were cleared up when the language introduced `let` and `const`. By and large, it is not used anymore. However, you will likely come across code which uses `var` at some point, so it is useful to know that it exists.

### Numbers

Expand Down

0 comments on commit e1e6b6f

Please sign in to comment.