TypeScript variable declaration

1. The new way of variable declarations

  letAnd consta variable declaration way JavaScript ES6 newly added. letIn many respects varit is similar, but it can avoid some of the common problems in the JavaScript. And const则is letan enhanced, it will stop for a variable assignment (secondary assignment) again.

  Because TypeScript is a superset of JavaScript, so it supports itself letand const.

⒉var statement

 

Guess you like

Origin www.cnblogs.com/fanqisoft/p/11828839.html