Declaring our variables – the ECMAScript 6 way

TypeScript, as a superset of ECMAScript 6, supports expressive declaration nouns such as let, which informs us that the variable is scoped to the nearest enclosing block (either a function for loop or any enclosing statement). On the other hand, const is an indicator that the values declared this way are meant to always feature the same type or value once populated. For the rest of this chapter, we will enforce the traditional var notation for declaring variables, but do remember to use let and const where appropriate.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset