return|throw|break|yield
a + b
//
return|throw|break|yield;
a+b
a = b
++c
//
a=b;
++ca
//
a
=> a
var a = b = 1
a = b
+1
a = b
/something/.test(a)
a = b
(function () {})()
a = b
[1, 2, 3].forEach()
var a = {}
a.valueOf = function () {
return 1
}
a.toString = function () {
return 2
}
var b = {}
b.valueOf = function () {
return 1
}
b.toString = function () {
return 2
}
console.log(a == b)
console.log(1 == a)
console.log(2 == a)
1 == true
1 == '1'
null == undefined
0 == null
0 == undefined
NaN == NaN
Keyword::one of
break do in typeof case else instanceof var catch export new void class extends return while const finally super with continue for switch yield debugger function this default if throw delete import try
var a = {
b: function () {
console.log(this.c);
},
c: 3
}
a.b();
new a.b();
var c = 3;
var b = () => {
var c = 2;
console.log(this.c)};
b();
b.call({c:4});
var a = {
c: 1,
b: function () {
console.log(this.c);
}
}
var c = {
c: 3
}
[1,2,3].forEach(a.b, c)
[1,2,3].forEach(a.b, undefined)
所有函数调用最终都是执行 F.[[Call]](thisArgument, argumentsList)
var a = {this: 1, b: 2};
with(a) {
console.log(b);
console.log(this);
}