在即将到来的ECMAScript 6中,引入了一种名叫方法定义(method definition)的新语法糖,相对于以前的完整写法,这种简写形式可以让你少写一个function键字.
基于16个网页-相关网页
Project method definition 计划方法定义
re-definition method 重新定义法
Definition method 定义法 ; 界定方法
Method of Definition 命名方式
Integration Definition Method 集成定义方法
Vienna definition method 维也纳定义方法
Definition and method of calculation 定义和计算方法
Policy definition method 策略定义方法
Listing 3 shows the method definition.
清单3给出方法定义。
The EPF is a method definition framework.
EPF 是一个方法定义框架。
Consider the Ruby method definition shown in Listing 5.
看一下清单5中所示的Ruby的方法定义。
So another way saying it again is, when I call the class definition, by default I'm going to look to see is there an init method there, and if there is, I'm going to use it.
当我调用类的定义,默认的是语言要去查看,是不是有个init的方法,如果有的话,程序就会调用它,按照惯例。
应用推荐