Issue
In the Variables and Types tutorial, it states that variables are defined using the var keyword. However, the examples immediately use const, which can be confusing for new learners.
> js
> const myNumber = 3; // a number
> const myString = "Hello, World!" // a string
> const myBoolean = true; // a boolean
> Expected Behavior
Expected Behavior
It would be helpful to include a short explanation clarifying why const is used instead of var, especially for beginners.
For example:
that const and let are modern JavaScript best practices
that var is older and generally discouraged in new code
or that const is preferred when a variable does not need to be reassigned
This small clarification would improve consistency and reduce confusion for new learners.
Screenshot
Tutorial Link
https://www.learn-js.org/en/Variables_and_Types
Thank you
Issue
In the Variables and Types tutorial, it states that variables are defined using the
varkeyword. However, the examples immediately useconst, which can be confusing for new learners.Expected Behavior
It would be helpful to include a short explanation clarifying why const is used instead of var, especially for beginners.
For example:
that const and let are modern JavaScript best practices
that var is older and generally discouraged in new code
or that const is preferred when a variable does not need to be reassigned
This small clarification would improve consistency and reduce confusion for new learners.
Screenshot
Tutorial Link
https://www.learn-js.org/en/Variables_and_Types
Thank you