Fully aware and thanks for raising this.
However in the big scheme of showing these basics to beginners in TypeScript I think it's a valid explanation.
We don't always want to make things the neatest when explaining certain topics.
For instance your example with return values is super valid, but if we don't explain the options how will people know about it, when they do need it?
Besides I did note in the article you don't need to explicitly name variables that are assigned already.
Anyway, love the debate going on here, but please keep in mind these articles are to show a very basic starting point to TypeScript.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Fully aware and thanks for raising this.
However in the big scheme of showing these basics to beginners in TypeScript I think it's a valid explanation.
We don't always want to make things the neatest when explaining certain topics.
For instance your example with return values is super valid, but if we don't explain the options how will people know about it, when they do need it?
Besides I did note in the article you don't need to explicitly name variables that are assigned already.
Anyway, love the debate going on here, but please keep in mind these articles are to show a very basic starting point to TypeScript.