doc: create this section
This commit is contained in:
1 parent
fa3f21e00a
commit
d7a7e89cf3
1 file changed
+14
@@ -16,3 +16,17 @@ abbrlink: 75f5b5c3
|
||||
- 例如,parseInt函数调用是parseInt('15')。
|
||||
- 调用的上下文是函数体中的值。
|
||||
- 函数的作用域是函数体中可访问的变量和函数的集合。
|
||||
|
||||
# this
|
||||
在“标准”语言中,这是当前对象的实例
|
||||
```java
|
||||
public int compareTo(Object other) {
|
||||
return this - other;
|
||||
}
|
||||
```
|
||||
|
||||
在JavaScript中,这是函数调用的上下文
|
||||
- 函数调用:alert('Hello World!')
|
||||
- 方法调用:console.log('Hello World!')
|
||||
- 构造函数调用:new RegExp ('d')
|
||||
- 间接调用:alert.call(undefined, 'Hello World!')
|
||||
Reference in new issue
Block a user