Chapter 3. Datatypes and Values

1. Function:
引用
An important feature of JavaScript is that functions are values that can be manipulated by JavaScript code. In many languages, including Java, functions are only a syntactic feature of the language: they can be defined and invoked, but they are not datatypes. The fact that functions are true values in JavaScript gives a lot of flexibility to the language. It means that functions can be stored in variables, arrays, and objects, and it means that functions can be passed as arguments to other functions. This can quite often be useful.

  • function 是一种能被JavaScript代码操作的值。
  • 这种特性给JavaScript带来了语言上很大的灵活性。
  • 所以,这意味着functions能够被存为变量,数组,对象, 也意味着function能够以参数的形式传递给其他的函数。


 

评论
发表评论

您还没有登录,请登录后发表评论

ian jiang
搜索本博客
博客分类
我的相册
803e70c7-f42d-386c-ad20-a94046fcc1ff-thumb
我们吃饭的地方.jpg
共 1 张
最近加入圈子
存档
最新评论