Local Variable Type Inference 隐含类型局部变量
Or, when editing code, type the expression first and use this refactoring to automatically create a new local variable to assign the result to.
或者,在编辑代码时,先键入此表达式并使用这种重构自动创建一个新本地变量来指定表达式的结果。
A new local variable of the same type as the method's return value is created for you.
系统将为您创建与该方法的返回值类型相同的新局部变量。
You use the function keyword to denote the start of a function and the var keyword to declare local (as opposed to global) variables, but you do not include the type of the variable being declared.
您可以使用function关键字开始函数的声明,使用var关键字来声明局部变量(这与全局变量不同),但是不用包括正在声明的变量的类型。
应用推荐