Created by William Kapke
kangax's compat-table applied only to Node.js
githubLearn more

Node.js ES2015 Support

15.0.0
(these versions have identical results)
nightly v8 8.6.395.16-node.15
Nightly!99% complete99% complete
14.14.0
(these versions have identical results)
14.14.0 v8 8.4.371.19-node.17
14.13.1 v8 8.4.371.19-node.16
14.13.0 v8 8.4.371.19-node.16
14.12.0 v8 8.4.371.19-node.16
14.11.0 v8 8.4.371.19-node.16
14.10.1 v8 8.4.371.19-node.16
14.10.0 v8 8.4.371.19-node.16
14.9.0 v8 8.4.371.19-node.13
14.8.0 v8 8.4.371.19-node.12
14.7.0 v8 8.4.371.19-node.12
14.6.0 v8 8.4.371.19-node.12
99% complete99% complete
14.5.0
(these versions have identical results)
14.5.0 v8 8.3.110.9-node.23
14.4.0 v8 8.1.307.31-node.33
14.3.0 v8 8.1.307.31-node.33
14.2.0 v8 8.1.307.31-node.33
14.1.0 v8 8.1.307.31-node.32
14.0.0 v8 8.1.307.30-node.30
99% complete99% complete
13.14.0
(these versions have identical results)
13.14.0 v8 7.9.317.25-node.32
13.13.0 v8 7.9.317.25-node.30
13.12.0 v8 7.9.317.25-node.30
13.11.0 v8 7.9.317.25-node.29
13.10.1 v8 7.9.317.25-node.29
13.10.0 v8 7.9.317.25-node.29
13.9.0 v8 7.9.317.25-node.28
13.8.0 v8 7.9.317.25-node.28
13.7.0 v8 7.9.317.25-node.28
13.6.0 v8 7.9.317.25-node.26
13.5.0 v8 7.9.317.25-node.23
13.4.0 v8 7.9.317.25-node.23
13.3.0 v8 7.9.317.25-node.23
13.2.0 v8 7.9.317.23-node.20
99% complete99% complete
13.1.0
(these versions have identical results)
13.1.0 v8 7.8.279.17-node.19
13.0.1 v8 7.8.279.17-node.14
13.0.0 v8 7.8.279.17-node.14
12.19.0 v8 7.8.279.23-node.44
12.18.4 v8 7.8.279.23-node.39
12.18.3 v8 7.8.279.23-node.39
12.18.2 v8 7.8.279.23-node.39
12.18.1 v8 7.8.279.23-node.38
12.18.0 v8 7.8.279.23-node.37
12.17.0 v8 7.8.279.23-node.37
12.16.3 v8 7.8.279.23-node.35
12.16.2 v8 7.8.279.23-node.34
12.16.1 v8 7.8.279.23-node.31
12.16.0 v8 7.8.279.23-node.31
12.15.0 v8 7.7.299.13-node.16
12.14.1 v8 7.7.299.13-node.16
12.14.0 v8 7.7.299.13-node.16
12.13.1 v8 7.7.299.13-node.16
12.13.0 v8 7.7.299.13-node.12
12.12.0 v8 7.7.299.13-node.12
12.11.1 v8 7.7.299.11-node.12
12.11.0 v8 7.7.299.11-node.12
99% complete99% complete
12.10.0
(these versions have identical results)
12.10.0 v8 7.6.303.29-node.16
12.9.1 v8 7.6.303.29-node.15
12.9.0 v8 7.6.303.29-node.15
99% complete99% complete
12.8.1
(these versions have identical results)
12.8.1 v8 7.5.288.22-node.16
12.8.0 v8 7.5.288.22-node.16
12.7.0 v8 7.5.288.22-node.16
12.6.0 v8 7.5.288.22-node.14
12.5.0 v8 7.5.288.22-node.14
99% complete99% complete
12.4.0
(these versions have identical results)
12.4.0 v8 7.4.288.27-node.18
12.3.1 v8 7.4.288.27-node.18
12.3.0 v8 7.4.288.27-node.17
12.2.0 v8 7.4.288.21-node.17
12.1.0 v8 7.4.288.21-node.16
12.0.0 v8 7.4.288.21-node.16
99% complete99% complete
11.15.0
(these versions have identical results)
11.15.0 v8 7.0.276.38-node.19
11.14.0 v8 7.0.276.38-node.18
11.13.0 v8 7.0.276.38-node.18
11.12.0 v8 7.0.276.38-node.18
11.11.0 v8 7.0.276.38-node.18
11.10.1 v8 7.0.276.38-node.17
11.10.0 v8 7.0.276.38-node.17
11.9.0 v8 7.0.276.38-node.16
11.8.0 v8 7.0.276.38-node.16
11.7.0 v8 7.0.276.38-node.16
11.6.0 v8 7.0.276.38-node.13
11.5.0 v8 7.0.276.38-node.13
11.4.0 v8 7.0.276.38-node.13
11.3.0 v8 7.0.276.38-node.11
11.2.0 v8 7.0.276.38-node.11
11.1.0 v8 7.0.276.32-node.7
11.0.0 v8 7.0.276.28-node.5
99% complete99% complete
10.22.1
(these versions have identical results)
10.22.1 v8 6.8.275.32-node.58
10.22.0 v8 6.8.275.32-node.58
10.21.0 v8 6.8.275.32-node.56
10.20.1 v8 6.8.275.32-node.56
10.20.0 v8 6.8.275.32-node.56
10.19.0 v8 6.8.275.32-node.55
10.18.1 v8 6.8.275.32-node.55
10.18.0 v8 6.8.275.32-node.54
10.17.0 v8 6.8.275.32-node.54
10.16.3 v8 6.8.275.32-node.54
10.16.2 v8 6.8.275.32-node.54
10.16.1 v8 6.8.275.32-node.54
10.16.0 v8 6.8.275.32-node.52
10.15.3 v8 6.8.275.32-node.51
10.15.2 v8 6.8.275.32-node.12
10.15.1 v8 6.8.275.32-node.12
10.15.0 v8 6.8.275.32-node.45
10.14.2 v8 6.8.275.32-node.45
10.14.1 v8 6.8.275.32-node.36
10.14.0 v8 6.8.275.32-node.36
10.13.0 v8 6.8.275.32-node.36
10.12.0 v8 6.8.275.32-node.35
10.11.0 v8 6.8.275.32-node.28
10.10.0 v8 6.8.275.30-node.24
10.9.0 v8 6.8.275.24-node.14
99% complete99% complete
10.8.0
(these versions have identical results)
10.8.0 v8 6.7.288.49-node.19
10.7.0 v8 6.7.288.49-node.15
10.6.0 v8 6.7.288.46-node.13
10.5.0 v8 6.7.288.46-node.8
10.4.1 v8 6.7.288.45-node.7
10.4.0 v8 6.7.288.43-node.7
99% complete99% complete
10.3.0
(these versions have identical results)
10.3.0 v8 6.6.346.32-node.9
10.2.1 v8 6.6.346.32-node.8
10.2.0 v8 6.6.346.32-node.8
10.1.0 v8 6.6.346.27-node.6
10.0.0 v8 6.6.346.24-node.5
99% complete99% complete
9.11.2
(these versions have identical results)
9.11.2 v8 6.2.414.46-node.23
9.11.1 v8 6.2.414.46-node.23
9.11.0 v8 6.2.414.46-node.23
9.10.1 v8 6.2.414.46-node.23
9.10.0 v8 6.2.414.46-node.23
9.9.0 v8 6.2.414.46-node.22
9.8.0 v8 6.2.414.46-node.21
9.7.1 v8 6.2.414.46-node.20
9.7.0 v8 6.2.414.46-node.20
9.6.1 v8 6.2.414.46-node.20
9.6.0 v8 6.2.414.46-node.20
9.5.0 v8 6.2.414.46-node.18
9.4.0 v8 6.2.414.46-node.17
9.3.0 v8 6.2.414.46-node.15
9.2.1 v8 6.2.414.44-node.11
9.2.0 v8 6.2.414.44-node.11
9.1.0 v8 6.2.414.32-node.8
9.0.0 v8 6.2.414.32-node.8
8.17.0 v8 6.2.414.78
8.16.2 v8 6.2.414.78
8.16.1 v8 6.2.414.77
8.16.0 v8 6.2.414.77
8.15.1 v8 6.2.414.75
8.15.0 v8 6.2.414.75
8.14.1 v8 6.2.414.75
8.14.0 v8 6.2.414.72
8.13.0 v8 6.2.414.72
8.12.0 v8 6.2.414.66
8.11.4 v8 6.2.414.54
8.11.3 v8 6.2.414.54
8.11.2 v8 6.2.414.54
8.11.1 v8 6.2.414.50
8.11.0 v8 6.2.414.50
8.10.0 v8 6.2.414.50
99% complete99% complete
8.9.4
(these versions have identical results)
8.9.4 v8 6.1.534.50
8.9.3 v8 6.1.534.48
8.9.2 v8 6.1.534.48
8.9.1 v8 6.1.534.47
8.9.0 v8 6.1.534.46
8.8.1 v8 6.1.534.42
8.8.0 v8 6.1.534.42
8.7.0 v8 6.1.534.42
99% complete99% complete
8.6.0
(these versions have identical results)
8.6.0 v8 6.0.287.53
8.5.0 v8 6.0.287.53
8.4.0 v8 6.0.286.52
8.3.0 v8 6.0.286.52
99% complete99% complete
8.2.1
(these versions have identical results)
8.2.1 v8 5.8.283.41
8.2.0 v8 5.8.283.41
8.1.4 v8 5.8.283.41
8.1.3 v8 5.8.283.41
8.1.2 v8 5.8.283.41
8.1.1 v8 5.8.283.41
8.1.0 v8 5.8.283.41
8.0.0 v8 5.8.283.41
99% complete99% complete
7.10.1
(these versions have identical results)
7.10.1 v8 5.5.372.43
7.10.0 v8 5.5.372.43
7.9.0 v8 5.5.372.43
7.8.0 v8 5.5.372.43
7.7.4 v8 5.5.372.42
7.7.3 v8 5.5.372.41
7.7.2 v8 5.5.372.41
7.7.1 v8 5.5.372.41
7.7.0 v8 5.5.372.41
7.6.0 v8 5.5.372.40
99% complete99% complete
7.5.0
(these versions have identical results)
7.5.0 v8 5.4.500.48
7.4.0 v8 5.4.500.45
7.3.0 v8 5.4.500.45
7.2.1 v8 5.4.500.44
7.2.0 v8 5.4.500.43
7.1.0 v8 5.4.500.36
7.0.0 v8 5.4.500.36
99% complete98% complete
6.17.1
(these versions have identical results)
6.17.1 v8 5.1.281.111
6.17.0 v8 5.1.281.111
6.16.0 v8 5.1.281.111
6.15.1 v8 5.1.281.111
6.15.0 v8 5.1.281.111
6.14.4 v8 5.1.281.111
6.14.3 v8 5.1.281.111
6.14.2 v8 5.1.281.111
6.14.1 v8 5.1.281.111
6.14.0 v8 5.1.281.111
6.13.1 v8 5.1.281.111
6.13.0 v8 5.1.281.111
6.12.3 v8 5.1.281.111
6.12.2 v8 5.1.281.109
6.12.1 v8 5.1.281.109
6.12.0 v8 5.1.281.108
6.11.5 v8 5.1.281.108
6.11.4 v8 5.1.281.108
6.11.3 v8 5.1.281.107
6.11.2 v8 5.1.281.103
6.11.1 v8 5.1.281.103
6.11.0 v8 5.1.281.102
6.10.3 v8 5.1.281.101
6.10.2 v8 5.1.281.98
6.10.1 v8 5.1.281.95
6.10.0 v8 5.1.281.93
6.9.5 v8 5.1.281.89
6.9.4 v8 5.1.281.89
6.9.3 v8 5.1.281.89
6.9.2 v8 5.1.281.88
6.9.1 v8 5.1.281.84
6.9.0 v8 5.1.281.84
6.8.1 v8 5.1.281.84
6.8.0 v8 5.1.281.84
6.7.0 v8 5.1.281.83
6.6.0 v8 5.1.281.83
6.5.0 v8 5.1.281.81
99% complete99% complete
6.4.0
(these versions have identical results)
6.4.0 v8 5.0.71.60
6.3.1 v8 5.0.71.57
6.3.0 v8 5.0.71.52
6.2.2 v8 5.0.71.52
6.2.1 v8 5.0.71.52
6.2.0 v8 5.0.71.47
6.1.0 v8 5.0.71.35
6.0.0 v8 5.0.71.35
95% complete91% complete
5.12.0
(these versions have identical results)
5.12.0 v8 4.6.85.32
5.11.1 v8 4.6.85.31
5.11.0 v8 4.6.85.31
5.10.1 v8 4.6.85.31
5.10.0 v8 4.6.85.31
5.9.1 v8 4.6.85.31
5.9.0 v8 4.6.85.31
5.8.0 v8 4.6.85.31
5.7.1 v8 4.6.85.31
5.7.0 v8 4.6.85.31
5.6.0 v8 4.6.85.31
5.5.0 v8 4.6.85.31
5.4.1 v8 4.6.85.31
5.4.0 v8 4.6.85.31
5.3.0 v8 4.6.85.31
5.2.0 v8 4.6.85.31
5.1.1 v8 4.6.85.31
5.1.0 v8 4.6.85.31
5.0.0 v8 4.6.85.28
57% complete46% complete
4.9.1
(these versions have identical results)
4.9.1 v8 4.5.103.53
4.9.0 v8 4.5.103.53
4.8.7 v8 4.5.103.53
4.8.6 v8 4.5.103.53
4.8.5 v8 4.5.103.47
4.8.4 v8 4.5.103.47
4.8.3 v8 4.5.103.47
4.8.2 v8 4.5.103.46
4.8.1 v8 4.5.103.46
4.8.0 v8 4.5.103.45
4.7.3 v8 4.5.103.43
4.7.2 v8 4.5.103.43
4.7.1 v8 4.5.103.43
4.7.0 v8 4.5.103.43
4.6.2 v8 4.5.103.42
4.6.1 v8 4.5.103.37
4.6.0 v8 4.5.103.37
4.5.0 v8 4.5.103.37
4.4.7 v8 4.5.103.36
4.4.6 v8 4.5.103.36
4.4.5 v8 4.5.103.35
4.4.4 v8 4.5.103.35
4.4.3 v8 4.5.103.35
4.4.2 v8 4.5.103.35
4.4.1 v8 4.5.103.35
4.4.0 v8 4.5.103.35
4.3.2 v8 4.5.103.35
4.3.1 v8 4.5.103.35
4.3.0 v8 4.5.103.35
4.2.6 v8 4.5.103.35
4.2.5 v8 4.5.103.35
4.2.4 v8 4.5.103.35
4.2.3 v8 4.5.103.35
4.2.2 v8 4.5.103.35
4.2.1 v8 4.5.103.35
4.2.0 v8 4.5.103.35
4.1.2 v8 4.5.103.35
4.1.1 v8 4.5.103.33
4.1.0 v8 4.5.103.33
4.0.0 v8 4.5.103.30
47% complete43% complete
0.12.18
(these versions have identical results)
0.12.18 v8 3.28.71.20
29% complete23% complete
0.10.48
(these versions have identical results)
0.10.48 v8 3.14.5.11
11% complete6% complete

optimisation

proper tail calls (tail call optimisation)

§direct recursion
?
function(){
"use strict"; return (function f(n){ if (n <= 0) { return "foo"; } return f(n - 1); }(1e6)) === "foo";
}
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Flag
Error
Flag
Error
Flag
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
function(){
"use strict"; return (function f(n){ if (n <= 0) { return "foo"; } return f(n - 1); }(1e6)) === "foo";
}
§mutual recursion
?
function(){
"use strict"; function f(n){ if (n <= 0) { return "foo"; } return g(n - 1); } function g(n){ if (n <= 0) { return "bar"; } return f(n - 1); } return f(1e6) === "foo" && f(1e6+1) === "bar";
}
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
Flag
Error
Flag
Error
Flag
Error
Error
Error
Error
Error
Error
Error
Error
Error
Error
function(){
"use strict"; function f(n){ if (n <= 0) { return "foo"; } return g(n - 1); } function g(n){ if (n <= 0) { return "bar"; } return f(n - 1); } return f(1e6) === "foo" && f(1e6+1) === "bar";
}

syntax

default function parameters

§basic functionality
?
function(){
return (function (a = 1, b = 2) { return a === 3 && b === 2; }(3));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function (a = 1, b = 2) { return a === 3 && b === 2; }(3));
}
§explicit undefined defers to the default
?
function(){
return (function (a = 1, b = 2) { return a === 1 && b === 3; }(undefined, 3));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function (a = 1, b = 2) { return a === 1 && b === 3; }(undefined, 3));
}
§defaults can refer to previous params
?
function(){
return (function (a, b = a) { return b === 5; }(5));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function (a, b = a) { return b === 5; }(5));
}
§arguments object interaction
?
function(){
return (function (a = "baz", b = "qux", c = "quux") { a = "corge"; // The arguments object is not mapped to the // parameters, even outside of strict mode. return arguments.length === 2 && arguments[0] === "foo" && arguments[1] === "bar"; }("foo", "bar"));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function (a = "baz", b = "qux", c = "quux") { a = "corge"; // The arguments object is not mapped to the // parameters, even outside of strict mode. return arguments.length === 2 && arguments[0] === "foo" && arguments[1] === "bar"; }("foo", "bar"));
}
§temporal dead zone
?
function(){
return (function(x = 1) { try { eval("(function(a=a){}())"); return false; } catch(e) {} try { eval("(function(a=b,b){}())"); return false; } catch(e) {} return true; }());
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function(x = 1) { try { eval("(function(a=a){}())"); return false; } catch(e) {} try { eval("(function(a=b,b){}())"); return false; } catch(e) {} return true; }());
}
§separate scope
?
function(){
return (function(a=function(){ return typeof b === 'undefined'; }){ var b = 1; return a(); }());
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function(a=function(){ return typeof b === 'undefined'; }){ var b = 1; return a(); }());
}
§new Function() support
?
function(){
return new Function("a = 1", "b = 2", "return a === 3 && b === 2;" )(3);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return new Function("a = 1", "b = 2", "return a === 3 && b === 2;" )(3);
}

rest parameters

§basic functionality
?
function(){
return (function (foo, ...args) { return args instanceof Array && args + "" === "bar,baz"; }("foo", "bar", "baz"));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
Error
Error
Error
Error
function(){
return (function (foo, ...args) { return args instanceof Array && args + "" === "bar,baz"; }("foo", "bar", "baz"));
}
§function 'length' property
?
function(){
return function(a, ...b){}.length === 1 && function(...c){}.length === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
Error
Error
Error
Error
function(){
return function(a, ...b){}.length === 1 && function(...c){}.length === 0;
}
§arguments object interaction
?
function(){
return (function (foo, ...args) { foo = "qux"; // The arguments object is not mapped to the // parameters, even outside of strict mode. return arguments.length === 3 && arguments[0] === "foo" && arguments[1] === "bar" && arguments[2] === "baz"; }("foo", "bar", "baz"));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
Error
Error
Error
Error
function(){
return (function (foo, ...args) { foo = "qux"; // The arguments object is not mapped to the // parameters, even outside of strict mode. return arguments.length === 3 && arguments[0] === "foo" && arguments[1] === "bar" && arguments[2] === "baz"; }("foo", "bar", "baz"));
}
§can't be used in setters
?
function(){
return (function (...args) { try { eval("({set e(...args){}})"); } catch(e) { return true; } }());
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
Error
Error
Error
Error
function(){
return (function (...args) { try { eval("({set e(...args){}})"); } catch(e) { return true; } }());
}
§new Function() support
?
function(){
return new Function("a", "...b", "return b instanceof Array && a+b === 'foobar,baz';" )('foo','bar','baz');
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
Error
Error
Error
Error
function(){
return new Function("a", "...b", "return b instanceof Array && a+b === 'foobar,baz';" )('foo','bar','baz');
}

spread syntax for iterable objects

§with arrays, in function calls
?
function(){
return Math.max(...[1, 2, 3]) === 3
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
return Math.max(...[1, 2, 3]) === 3
}
§with arrays, in array literals
?
function(){
return [...[1, 2, 3]][2] === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
return [...[1, 2, 3]][2] === 3;
}
§with sparse arrays, in function calls
?
function(){
var a = Array(...[,,]); return "0" in a && "1" in a && '' + a[0] + a[1] === "undefinedundefined";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var a = Array(...[,,]); return "0" in a && "1" in a && '' + a[0] + a[1] === "undefinedundefined";
}
§with sparse arrays, in array literals
?
function(){
var a = [...[,,]]; return "0" in a && "1" in a && '' + a[0] + a[1] === "undefinedundefined";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var a = [...[,,]]; return "0" in a && "1" in a && '' + a[0] + a[1] === "undefinedundefined";
}
§with strings, in function calls
?
function(){
return Math.max(..."1234") === 4;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
return Math.max(..."1234") === 4;
}
§with strings, in array literals
?
function(){
return ["a", ..."bcd", "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
return ["a", ..."bcd", "e"][3] === "d";
}
§with astral plane strings, in function calls
?
function(){
return Array(..."𠮷𠮶")[0] === "𠮷";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
return Array(..."𠮷𠮶")[0] === "𠮷";
}
§with astral plane strings, in array literals
?
function(){
return [..."𠮷𠮶"][0] === "𠮷";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
return [..."𠮷𠮶"][0] === "𠮷";
}
§with generator instances, in calls
?
function(){
var iterable = (function*(){ yield 1; yield 2; yield 3; }()); return Math.max(...iterable) === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var iterable = (function*(){ yield 1; yield 2; yield 3; }()); return Math.max(...iterable) === 3;
}
§with generator instances, in arrays
?
function(){
var iterable = (function*(){ yield "b"; yield "c"; yield "d"; }()); return ["a", ...iterable, "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var iterable = (function*(){ yield "b"; yield "c"; yield "d"; }()); return ["a", ...iterable, "e"][3] === "d";
}
§with generic iterables, in calls
?
function(){
var iterable = global.__createIterableObject([1, 2, 3]); return Math.max(...iterable) === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var iterable = global.__createIterableObject([1, 2, 3]); return Math.max(...iterable) === 3;
}
§with generic iterables, in arrays
?
function(){
var iterable = global.__createIterableObject(["b", "c", "d"]); return ["a", ...iterable, "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var iterable = global.__createIterableObject(["b", "c", "d"]); return ["a", ...iterable, "e"][3] === "d";
}
§with instances of iterables, in calls
?
function(){
var iterable = global.__createIterableObject([1, 2, 3]); return Math.max(...Object.create(iterable)) === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var iterable = global.__createIterableObject([1, 2, 3]); return Math.max(...Object.create(iterable)) === 3;
}
§with instances of iterables, in arrays
?
function(){
var iterable = global.__createIterableObject(["b", "c", "d"]); return ["a", ...Object.create(iterable), "e"][3] === "d";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
var iterable = global.__createIterableObject(["b", "c", "d"]); return ["a", ...Object.create(iterable), "e"][3] === "d";
}
§spreading non-iterables is a runtime error
?
function(){
try { Math.max(...2); } catch(e) { return Math.max(...[1, 2, 3]) === 3; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
No
Error
No
No
function(){
try { Math.max(...2); } catch(e) { return Math.max(...[1, 2, 3]) === 3; }
}

object literal extensions

§computed properties
?
function(){
var x = 'y'; return ({ [x]: 1 }).y === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var x = 'y'; return ({ [x]: 1 }).y === 1;
}
§shorthand properties
?
function(){
var a = 7, b = 8, c = {a,b}; return c.a === 7 && c.b === 8;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var a = 7, b = 8, c = {a,b}; return c.a === 7 && c.b === 8;
}
§shorthand methods
?
function(){
return ({ y() { return 2; } }).y() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
return ({ y() { return 2; } }).y() === 2;
}
§string-keyed shorthand methods
?
function(){
return ({ "foo bar"() { return 4; } })["foo bar"]() === 4;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
return ({ "foo bar"() { return 4; } })["foo bar"]() === 4;
}
§computed shorthand methods
?
function(){
var x = 'y'; return ({ [x](){ return 1 } }).y() === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var x = 'y'; return ({ [x](){ return 1 } }).y() === 1;
}
§computed accessors
?
function(){
var x = 'y', valueSet, obj = { get [x] () { return 1 }, set [x] (value) { valueSet = value } }; obj.y = 'foo'; return obj.y === 1 && valueSet === 'foo';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var x = 'y', valueSet, obj = { get [x] () { return 1 }, set [x] (value) { valueSet = value } }; obj.y = 'foo'; return obj.y === 1 && valueSet === 'foo';
}

for..of loops

§with arrays
?
function(){
var arr = [5]; for (var item of arr) return item === 5;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
function(){
var arr = [5]; for (var item of arr) return item === 5;
}
§with sparse arrays
?
function(){
var arr = [,,]; var count = 0; for (var item of arr) count += (item === void undefined); return count === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
function(){
var arr = [,,]; var count = 0; for (var item of arr) count += (item === void undefined); return count === 2;
}
§with strings
?
function(){
var str = ""; for (var item of "foo") str += item; return str === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
function(){
var str = ""; for (var item of "foo") str += item; return str === "foo";
}
§with astral plane strings
?
function(){
var str = ""; for (var item of "𠮷𠮶") str += item + " "; return str === "𠮷 𠮶 ";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
function(){
var str = ""; for (var item of "𠮷𠮶") str += item + " "; return str === "𠮷 𠮶 ";
}
§with generator instances
?
function(){
var result = ""; var iterable = (function*(){ yield 1; yield 2; yield 3; }()); for (var item of iterable) { result += item; } return result === "123";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
function(){
var result = ""; var iterable = (function*(){ yield 1; yield 2; yield 3; }()); for (var item of iterable) { result += item; } return result === "123";
}
§with generic iterables
?
function(){
var result = ""; var iterable = global.__createIterableObject([1, 2, 3]); for (var item of iterable) { result += item; } return result === "123";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
function(){
var result = ""; var iterable = global.__createIterableObject([1, 2, 3]); for (var item of iterable) { result += item; } return result === "123";
}
§with instances of generic iterables
?
function(){
var result = ""; var iterable = global.__createIterableObject([1, 2, 3]); for (var item of Object.create(iterable)) { result += item; } return result === "123";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
function(){
var result = ""; var iterable = global.__createIterableObject([1, 2, 3]); for (var item of Object.create(iterable)) { result += item; } return result === "123";
}
§iterator closing, break
?
function(){
var closed = false; var iter = __createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); for (var it of iter) break; return closed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
Error
Error
function(){
var closed = false; var iter = __createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); for (var it of iter) break; return closed;
}
§iterator closing, throw
?
function(){
var closed = false; var iter = __createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); try { for (var it of iter) throw 0; } catch(e){} return closed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
Error
Error
function(){
var closed = false; var iter = __createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); try { for (var it of iter) throw 0; } catch(e){} return closed;
}

octal and binary literals

§octal literals
?
function(){
return 0o10 === 8 && 0O10 === 8;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
function(){
return 0o10 === 8 && 0O10 === 8;
}
§binary literals
?
function(){
return 0b10 === 2 && 0B10 === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
function(){
return 0b10 === 2 && 0B10 === 2;
}
§octal supported by Number()
?
function(){
return Number('0o1') === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Flag
No
No
function(){
return Number('0o1') === 1;
}
§binary supported by Number()
?
function(){
return Number('0b1') === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Flag
No
No
function(){
return Number('0b1') === 1;
}

template literals

§basic functionality
?
function(){
var a = "ba", b = "QUX"; return `foo bar ${a + "z"} ${b.toLowerCase()}` === "foo bar\nbaz qux";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var a = "ba", b = "QUX"; return `foo bar ${a + "z"} ${b.toLowerCase()}` === "foo bar\nbaz qux";
}
§toString conversion
?
function(){
var a = { toString: function() { return "foo"; }, valueOf: function() { return "bar"; }, }; return `${a}` === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var a = { toString: function() { return "foo"; }, valueOf: function() { return "bar"; }, }; return `${a}` === "foo";
}
§tagged template literals
?
function(){
var called = false; function fn(parts, a, b) { called = true; return parts instanceof Array && parts[0] === "foo" && parts[1] === "bar\n" && parts.raw[0] === "foo" && parts.raw[1] === "bar\\n" && a === 123 && b === 456; } return fn `foo${123}bar\n${456}` && called;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var called = false; function fn(parts, a, b) { called = true; return parts instanceof Array && parts[0] === "foo" && parts[1] === "bar\n" && parts.raw[0] === "foo" && parts.raw[1] === "bar\\n" && a === 123 && b === 456; } return fn `foo${123}bar\n${456}` && called;
}
§passed array is frozen
?
function(){
return (function(parts) { return Object.isFrozen(parts) && Object.isFrozen(parts.raw); }) `foo${0}bar${0}baz`;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
return (function(parts) { return Object.isFrozen(parts) && Object.isFrozen(parts.raw); }) `foo${0}bar${0}baz`;
}
§line break normalisation
?
function(){
var cr = eval("`x" + String.fromCharCode(13) + "y`"); var lf = eval("`x" + String.fromCharCode(10) + "y`"); var crlf = eval("`x" + String.fromCharCode(13,10) + "y`"); return cr.length === 3 && lf.length === 3 && crlf.length === 3 && cr[1] === lf[1] && lf[1] === crlf[1] && crlf[1] === '\n';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var cr = eval("`x" + String.fromCharCode(13) + "y`"); var lf = eval("`x" + String.fromCharCode(10) + "y`"); var crlf = eval("`x" + String.fromCharCode(13,10) + "y`"); return cr.length === 3 && lf.length === 3 && crlf.length === 3 && cr[1] === lf[1] && lf[1] === crlf[1] && crlf[1] === '\n';
}
§TemplateStrings call site caching
?
function(){
// TemplateStrings caching was changed from per-contents to // per-call-site. // https://github.com/tc39/ecma262/pull/890 function strings(array) { return array; } function getStrings() { return strings`foo`; } var original = getStrings(); var other = strings`foo`; return original === getStrings() && original !== other;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
No
Error
No
No
function(){
// TemplateStrings caching was changed from per-contents to // per-call-site. // https://github.com/tc39/ecma262/pull/890 function strings(array) { return array; } function getStrings() { return strings`foo`; } var original = getStrings(); var other = strings`foo`; return original === getStrings() && original !== other;
}
§TemplateStrings permanent caching
?
function(){
function strings(array) { return array; } function getStrings() { return strings`foo`; } var original = getStrings(); var newed = new getStrings(); return original === getStrings() && original === newed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Error
No
No
function(){
function strings(array) { return array; } function getStrings() { return strings`foo`; } var original = getStrings(); var newed = new getStrings(); return original === getStrings() && original === newed;
}

RegExp "y" and "u" flags

§"y" flag
?
function(){
var re = new RegExp('\\w', 'y'); re.exec('xy'); return (re.exec('xy')[0] === 'y');
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var re = new RegExp('\\w', 'y'); re.exec('xy'); return (re.exec('xy')[0] === 'y');
}
§"y" flag, lastIndex
?
function(){
var re = new RegExp('yy', 'y'); re.lastIndex = 3; var result = re.exec('xxxyyxx')[0]; return result === 'yy' && re.lastIndex === 5;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var re = new RegExp('yy', 'y'); re.lastIndex = 3; var result = re.exec('xxxyyxx')[0]; return result === 'yy' && re.lastIndex === 5;
}
§"u" flag
?
function(){
return "𠮷".match(/^.$/u)[0].length === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return "𠮷".match(/^.$/u)[0].length === 2;
}
§"u" flag, non-BMP Unicode characters
?
function(){
return "𠮷x".match(/^.x$/u)[0].length === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
No
Error
No
No
function(){
return "𠮷x".match(/^.x$/u)[0].length === 3;
}
§"u" flag, Unicode code point escapes
?
function(){
return "𝌆".match(/\u{1d306}/u)[0].length === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return "𝌆".match(/\u{1d306}/u)[0].length === 2;
}
§"u" flag, case folding
?
function(){
return "ſ".match(/S/iu) && "S".match(/ſ/iu);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return "ſ".match(/S/iu) && "S".match(/ſ/iu);
}

destructuring, declarations

§with arrays
?
function(){
var [a, , [b], c] = [5, null, [6]]; return a === 5 && b === 6 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a, , [b], c] = [5, null, [6]]; return a === 5 && b === 6 && c === void undefined;
}
§with sparse arrays
?
function(){
var [a, , b] = [,,,]; return a === void undefined && b === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a, , b] = [,,,]; return a === void undefined && b === void undefined;
}
§with strings
?
function(){
var [a, b, c] = "ab"; return a === "a" && b === "b" && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a, b, c] = "ab"; return a === "a" && b === "b" && c === void undefined;
}
§with astral plane strings
?
function(){
var [c] = "𠮷𠮶"; return c === "𠮷";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [c] = "𠮷𠮶"; return c === "𠮷";
}
§with generator instances
?
function(){
var [a, b, c] = (function*(){ yield 1; yield 2; }()); return a === 1 && b === 2 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a, b, c] = (function*(){ yield 1; yield 2; }()); return a === 1 && b === 2 && c === void undefined;
}
§with generic iterables
?
function(){
var [a, b, c] = global.__createIterableObject([1, 2]); return a === 1 && b === 2 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a, b, c] = global.__createIterableObject([1, 2]); return a === 1 && b === 2 && c === void undefined;
}
§with instances of generic iterables
?
function(){
var [a, b, c] = Object.create(global.__createIterableObject([1, 2])); return a === 1 && b === 2 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a, b, c] = Object.create(global.__createIterableObject([1, 2])); return a === 1 && b === 2 && c === void undefined;
}
§iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); var [a, b] = iter; return closed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); var [a, b] = iter; return closed;
}
§trailing commas in iterable patterns
?
function(){
var [a,] = [1]; return a === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a,] = [1]; return a === 1;
}
§with objects
?
function(){
var {c, x:d, e} = {c:7, x:8}; return c === 7 && d === 8 && e === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var {c, x:d, e} = {c:7, x:8}; return c === 7 && d === 8 && e === void undefined;
}
§object destructuring with primitives
?
function(){
var {toFixed} = 2; var {slice} = ''; return toFixed === Number.prototype.toFixed && slice === String.prototype.slice;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var {toFixed} = 2; var {slice} = ''; return toFixed === Number.prototype.toFixed && slice === String.prototype.slice;
}
§trailing commas in object patterns
?
function(){
var {a,} = {a:1}; return a === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var {a,} = {a:1}; return a === 1;
}
§throws on null and undefined
?
function(){
try { var {a} = null; return false; } catch(e) { if (!(e instanceof TypeError)) return false; } try { var {b} = void undefined; return false; } catch(e) { if (!(e instanceof TypeError)) return false; } return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
try { var {a} = null; return false; } catch(e) { if (!(e instanceof TypeError)) return false; } try { var {b} = void undefined; return false; } catch(e) { if (!(e instanceof TypeError)) return false; } return true;
}
§computed properties
?
function(){
var qux = "corge"; var { [qux]: grault } = { corge: "garply" }; return grault === "garply";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var qux = "corge"; var { [qux]: grault } = { corge: "garply" }; return grault === "garply";
}
§multiples in a single var statement
?
function(){
var [a,b] = [5,6], {c,d} = {c:7,d:8}; return a === 5 && b === 6 && c === 7 && d === 8;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a,b] = [5,6], {c,d} = {c:7,d:8}; return a === 5 && b === 6 && c === 7 && d === 8;
}
§nested
?
function(){
var [e, {x:f, g}] = [9, {x:10}]; var {h, x:[i]} = {h:11, x:[12]}; return e === 9 && f === 10 && g === void undefined && h === 11 && i === 12;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [e, {x:f, g}] = [9, {x:10}]; var {h, x:[i]} = {h:11, x:[12]}; return e === 9 && f === 10 && g === void undefined && h === 11 && i === 12;
}
§in for-in loop heads
?
function(){
for(var [i, j, k] in { qux: 1 }) { return i === "q" && j === "u" && k === "x"; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
for(var [i, j, k] in { qux: 1 }) { return i === "q" && j === "u" && k === "x"; }
}
§in for-of loop heads
?
function(){
for(var [i, j, k] of [[1,2,3]]) { return i === 1 && j === 2 && k === 3; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
for(var [i, j, k] of [[1,2,3]]) { return i === 1 && j === 2 && k === 3; }
}
§in catch heads
?
function(){
try { throw [1,2]; } catch([i,j]) { try { throw { k: 3, l: 4 }; } catch({k, l}) { return i === 1 && j === 2 && k === 3 && l === 4; } }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
try { throw [1,2]; } catch([i,j]) { try { throw { k: 3, l: 4 }; } catch({k, l}) { return i === 1 && j === 2 && k === 3 && l === 4; } }
}
§rest
?
function(){
var [a, ...b] = [3, 4, 5]; var [c, ...d] = [6]; return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var [a, ...b] = [3, 4, 5]; var [c, ...d] = [6]; return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0;
}
§defaults
?
function(){
var {a = 1, b = 0, z:c = 3} = {b:2, z:undefined}; var [d = 0, e = 5, f = 6] = [4,,undefined]; return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var {a = 1, b = 0, z:c = 3} = {b:2, z:undefined}; var [d = 0, e = 5, f = 6] = [4,,undefined]; return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6;
}
§defaults, let temporal dead zone
?
function(){
var {a, b = 2} = {a:1}; try { eval("let {c = c} = {};"); return false; } catch(e){} try { eval("let {c = d, d} = {d:1};"); return false; } catch(e){} return a === 1 && b === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var {a, b = 2} = {a:1}; try { eval("let {c = c} = {};"); return false; } catch(e){} try { eval("let {c = d, d} = {d:1};"); return false; } catch(e){} return a === 1 && b === 2;
}

destructuring, assignment

§with arrays
?
function(){
var a,b,c; [a, , [b], c] = [5, null, [6]]; return a === 5 && b === 6 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c; [a, , [b], c] = [5, null, [6]]; return a === 5 && b === 6 && c === void undefined;
}
§with sparse arrays
?
function(){
var a, b; [a, , b] = [,,,]; return a === void undefined && b === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a, b; [a, , b] = [,,,]; return a === void undefined && b === void undefined;
}
§with strings
?
function(){
var a,b,c; [a, b, c] = "ab"; return a === "a" && b === "b" && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c; [a, b, c] = "ab"; return a === "a" && b === "b" && c === void undefined;
}
§with astral plane strings
?
function(){
var c; [c] = "𠮷𠮶"; return c === "𠮷";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var c; [c] = "𠮷𠮶"; return c === "𠮷";
}
§with generator instances
?
function(){
var a,b,c; [a, b, c] = (function*(){ yield 1; yield 2; }()); return a === 1 && b === 2 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c; [a, b, c] = (function*(){ yield 1; yield 2; }()); return a === 1 && b === 2 && c === void undefined;
}
§with generic iterables
?
function(){
var a,b,c; [a, b, c] = global.__createIterableObject([1, 2]); return a === 1 && b === 2 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c; [a, b, c] = global.__createIterableObject([1, 2]); return a === 1 && b === 2 && c === void undefined;
}
§with instances of generic iterables
?
function(){
var a,b,c; [a, b, c] = Object.create(global.__createIterableObject([1, 2])); return a === 1 && b === 2 && c === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c; [a, b, c] = Object.create(global.__createIterableObject([1, 2])); return a === 1 && b === 2 && c === void undefined;
}
§iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); var a,b; [a, b] = iter; return closed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); var a,b; [a, b] = iter; return closed;
}
§iterable destructuring expression
?
function(){
var a, b, iterable = [1,2]; return ([a, b] = iterable) === iterable;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a, b, iterable = [1,2]; return ([a, b] = iterable) === iterable;
}
§chained iterable destructuring
?
function(){
var a,b,c,d; [a,b] = [c,d] = [1,2]; return a === 1 && b === 2 && c === 1 && d === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c,d; [a,b] = [c,d] = [1,2]; return a === 1 && b === 2 && c === 1 && d === 2;
}
§trailing commas in iterable patterns
?
function(){
var a; [a,] = [1]; return a === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a; [a,] = [1]; return a === 1;
}
§with objects
?
function(){
var c,d,e; ({c, x:d, e} = {c:7, x:8}); return c === 7 && d === 8 && e === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var c,d,e; ({c, x:d, e} = {c:7, x:8}); return c === 7 && d === 8 && e === void undefined;
}
§object destructuring with primitives
?
function(){
var toFixed, slice; ({toFixed} = 2); ({slice} = ''); return toFixed === Number.prototype.toFixed && slice === String.prototype.slice;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var toFixed, slice; ({toFixed} = 2); ({slice} = ''); return toFixed === Number.prototype.toFixed && slice === String.prototype.slice;
}
§trailing commas in object patterns
?
function(){
var a; ({a,} = {a:1}); return a === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a; ({a,} = {a:1}); return a === 1;
}
§object destructuring expression
?
function(){
var a, b, obj = { a:1, b:2 }; return ({a,b} = obj) === obj;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a, b, obj = { a:1, b:2 }; return ({a,b} = obj) === obj;
}
§parenthesised left-hand-side is a syntax error
?
function(){
var a, b; ({a,b} = {a:1,b:2}); try { eval("({a,b}) = {a:3,b:4};"); } catch(e) { return a === 1 && b === 2; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a, b; ({a,b} = {a:1,b:2}); try { eval("({a,b}) = {a:3,b:4};"); } catch(e) { return a === 1 && b === 2; }
}
§chained object destructuring
?
function(){
var a,b,c,d; ({a,b} = {c,d} = {a:1,b:2,c:3,d:4}); return a === 1 && b === 2 && c === 3 && d === 4;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c,d; ({a,b} = {c,d} = {a:1,b:2,c:3,d:4}); return a === 1 && b === 2 && c === 3 && d === 4;
}
§throws on null and undefined
?
function(){
var a,b; try { ({a} = null); return false; } catch(e) { if (!(e instanceof TypeError)) return false; } try { ({b} = void undefined); return false; } catch(e) { if (!(e instanceof TypeError)) return false; } return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b; try { ({a} = null); return false; } catch(e) { if (!(e instanceof TypeError)) return false; } try { ({b} = void undefined); return false; } catch(e) { if (!(e instanceof TypeError)) return false; } return true;
}
§computed properties
?
function(){
var grault, qux = "corge"; ({ [qux]: grault } = { corge: "garply" }); return grault === "garply";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var grault, qux = "corge"; ({ [qux]: grault } = { corge: "garply" }); return grault === "garply";
}
§nested
?
function(){
var e,f,g,h,i; [e, {x:f, g}] = [9, {x:10}]; ({h, x:[i]} = {h:11, x:[12]}); return e === 9 && f === 10 && g === void undefined && h === 11 && i === 12;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var e,f,g,h,i; [e, {x:f, g}] = [9, {x:10}]; ({h, x:[i]} = {h:11, x:[12]}); return e === 9 && f === 10 && g === void undefined && h === 11 && i === 12;
}
§rest
?
function(){
var a,b,c,d; [a, ...b] = [3, 4, 5]; [c, ...d] = [6]; return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c,d; [a, ...b] = [3, 4, 5]; [c, ...d] = [6]; return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0;
}
§nested rest
?
function(){
var a = [1, 2, 3], first, last; [first, ...[a[2], last]] = a; return first === 1 && last === 3 && (a + "") === "1,2,2";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a = [1, 2, 3], first, last; [first, ...[a[2], last]] = a; return first === 1 && last === 3 && (a + "") === "1,2,2";
}
§empty patterns
?
function(){
[] = [1,2]; ({} = {a:1,b:2}); return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
[] = [1,2]; ({} = {a:1,b:2}); return true;
}
§defaults
?
function(){
var a,b,c,d,e,f; ({a = 1, b = 0, z:c = 3} = {b:2, z:undefined}); [d = 0, e = 5, f = 6] = [4,,undefined]; return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var a,b,c,d,e,f; ({a = 1, b = 0, z:c = 3} = {b:2, z:undefined}); [d = 0, e = 5, f = 6] = [4,,undefined]; return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6;
}

destructuring, parameters

§with arrays
?
function(){
return function([a, , [b], c]) { return a === 5 && b === 6 && c === void undefined; }([5, null, [6]]);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a, , [b], c]) { return a === 5 && b === 6 && c === void undefined; }([5, null, [6]]);
}
§with sparse arrays
?
function(){
return function([a, , b]) { return a === void undefined && b === void undefined; }([,,,]);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a, , b]) { return a === void undefined && b === void undefined; }([,,,]);
}
§with strings
?
function(){
return function([a, b, c]) { return a === "a" && b === "b" && c === void undefined; }("ab");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a, b, c]) { return a === "a" && b === "b" && c === void undefined; }("ab");
}
§with astral plane strings
?
function(){
return function([c]) { return c === "𠮷"; }("𠮷𠮶");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([c]) { return c === "𠮷"; }("𠮷𠮶");
}
§with generator instances
?
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === void undefined; }(function*(){ yield 1; yield 2; }());
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === void undefined; }(function*(){ yield 1; yield 2; }());
}
§with generic iterables
?
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === void undefined; }(global.__createIterableObject([1, 2]));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === void undefined; }(global.__createIterableObject([1, 2]));
}
§with instances of generic iterables
?
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === void undefined; }(Object.create(global.__createIterableObject([1, 2])));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a, b, c]) { return a === 1 && b === 2 && c === void undefined; }(Object.create(global.__createIterableObject([1, 2])));
}
§iterator closing
?
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); (function([a,b]) {}(iter)); return closed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var closed = false; var iter = global.__createIterableObject([1, 2, 3], { 'return': function(){ closed = true; return {}; } }); (function([a,b]) {}(iter)); return closed;
}
§trailing commas in iterable patterns
?
function(){
return function([a,]) { return a === 1; }([1]);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a,]) { return a === 1; }([1]);
}
§with objects
?
function(){
return function({c, x:d, e}) { return c === 7 && d === 8 && e === void undefined; }({c:7, x:8});
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function({c, x:d, e}) { return c === 7 && d === 8 && e === void undefined; }({c:7, x:8});
}
§object destructuring with primitives
?
function(){
return function({toFixed}, {slice}) { return toFixed === Number.prototype.toFixed && slice === String.prototype.slice; }(2,'');
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function({toFixed}, {slice}) { return toFixed === Number.prototype.toFixed && slice === String.prototype.slice; }(2,'');
}
§trailing commas in object patterns
?
function(){
return function({a,}) { return a === 1; }({a:1});
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function({a,}) { return a === 1; }({a:1});
}
§throws on null and undefined
?
function(){
try { (function({a}){}(null)); return false; } catch(e) {} try { (function({b}){}(undefined)); return false; } catch(e) {} return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
try { (function({a}){}(null)); return false; } catch(e) {} try { (function({b}){}(undefined)); return false; } catch(e) {} return true;
}
§computed properties
?
function(){
var qux = "corge"; return function({ [qux]: grault }) { return grault === "garply"; }({ corge: "garply" });
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
var qux = "corge"; return function({ [qux]: grault }) { return grault === "garply"; }({ corge: "garply" });
}
§nested
?
function(){
return function([e, {x:f, g}], {h, x:[i]}) { return e === 9 && f === 10 && g === void undefined && h === 11 && i === 12; }([9, {x:10}],{h:11, x:[12]});
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([e, {x:f, g}], {h, x:[i]}) { return e === 9 && f === 10 && g === void undefined && h === 11 && i === 12; }([9, {x:10}],{h:11, x:[12]});
}
§'arguments' interaction
?
function(){
return (function({a, x:b, y:e}, [c, d]) { return arguments[0].a === 1 && arguments[0].x === 2 && !("y" in arguments[0]) && arguments[1] + '' === "3,4"; }({a:1, x:2}, [3, 4]));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function({a, x:b, y:e}, [c, d]) { return arguments[0].a === 1 && arguments[0].x === 2 && !("y" in arguments[0]) && arguments[1] + '' === "3,4"; }({a:1, x:2}, [3, 4]));
}
§new Function() support
?
function(){
return new Function("{a, x:b, y:e}","[c, d]", "return a === 1 && b === 2 && c === 3 && " + "d === 4 && e === void undefined;" )({a:1, x:2}, [3, 4]);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return new Function("{a, x:b, y:e}","[c, d]", "return a === 1 && b === 2 && c === 3 && " + "d === 4 && e === void undefined;" )({a:1, x:2}, [3, 4]);
}
§in parameters, function 'length' property
?
function(){
return function({a, b}, [c, d]){}.length === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function({a, b}, [c, d]){}.length === 2;
}
§rest
?
function(){
return function([a, ...b], [c, ...d]) { return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0; }([3, 4, 5], [6]);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function([a, ...b], [c, ...d]) { return a === 3 && b instanceof Array && (b + "") === "4,5" && c === 6 && d instanceof Array && d.length === 0; }([3, 4, 5], [6]);
}
§empty patterns
?
function(){
return function ([],{}){ return arguments[0] + '' === "3,4" && arguments[1].x === "foo"; }([3,4],{x:"foo"});
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return function ([],{}){ return arguments[0] + '' === "3,4" && arguments[1].x === "foo"; }([3,4],{x:"foo"});
}
§defaults
?
function(){
return (function({a = 1, b = 0, c = 3, x:d = 0, y:e = 5}, [f = 6, g = 0, h = 8]) { return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6 && g === 7 && h === 8; }({b:2, c:undefined, x:4},[, 7, undefined]));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function({a = 1, b = 0, c = 3, x:d = 0, y:e = 5}, [f = 6, g = 0, h = 8]) { return a === 1 && b === 2 && c === 3 && d === 4 && e === 5 && f === 6 && g === 7 && h === 8; }({b:2, c:undefined, x:4},[, 7, undefined]));
}
§defaults, separate scope
?
function(){
return (function({a=function(){ return typeof b === 'undefined'; }}){ var b = 1; return a(); }({}));
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return (function({a=function(){ return typeof b === 'undefined'; }}){ var b = 1; return a(); }({}));
}
§defaults, new Function() support
?
function(){
return new Function("{a = 1, b = 0, c = 3, x:d = 0, y:e = 5}", "return a === 1 && b === 2 && c === 3 && d === 4 && e === 5;" )({b:2, c:undefined, x:4});
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Error
function(){
return new Function("{a = 1, b = 0, c = 3, x:d = 0, y:e = 5}", "return a === 1 && b === 2 && c === 3 && d === 4 && e === 5;" )({b:2, c:undefined, x:4});
}
§aliased defaults, arrow function
?
function(){
return ((a, {b: x = 0, c: y = 3}) => { return a === 1 && x === 2 && y === 3; })(1, {b: 2});
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
No
Error
No
No
function(){
return ((a, {b: x = 0, c: y = 3}) => { return a === 1 && x === 2 && y === 3; })(1, {b: 2});
}
§shorthand defaults, arrow function
?
function(){
return ((a, {b = 0, c = 3}) => { return a === 1 && b === 2 && c === 3; })(1, {b: 2});
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
No
Error
No
No
function(){
return ((a, {b = 0, c = 3}) => { return a === 1 && b === 2 && c === 3; })(1, {b: 2});
}

Unicode code point escapes

§in strings
?
function(){
return '\u{1d306}' === '\ud834\udf06';
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
return '\u{1d306}' === '\ud834\udf06';
}
§in identifiers
?
function(){
var \u{102C0} = 2; return \u{102C0} === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
var \u{102C0} = 2; return \u{102C0} === 2;
}
§in property key definitions
?
function(){
var o = { \u{102C0} : 2 }; return o['\ud800\udec0'] === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Error
No
No
function(){
var o = { \u{102C0} : 2 }; return o['\ud800\udec0'] === 2;
}
§in property key accesses
?
function(){
var o = { '\ud800\udec0' : 2 }; return o.\u{102C0} === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Error
No
No
function(){
var o = { '\ud800\udec0' : 2 }; return o.\u{102C0} === 2;
}

new.target

§in constructors
?
function(){
var passed = false; new function f() { passed = (new.target === f); }(); (function() { passed &= (new.target === void undefined); }()); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
function(){
var passed = false; new function f() { passed = (new.target === f); }(); (function() { passed &= (new.target === void undefined); }()); return passed;
}
§assignment is an early error
?
function(){
var passed = false; new function f() { passed = (new.target === f); }(); try { Function("new.target = function(){};"); } catch(e) { return passed; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
function(){
var passed = false; new function f() { passed = (new.target === f); }(); try { Function("new.target = function(){};"); } catch(e) { return passed; }
}

bindings

const

§basic support
?
function(){
const foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
function(){
const foo = 123; return (foo === 123);
}
§is block-scoped
?
function(){
const bar = 123; { const bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Flag
function(){
const bar = 123; { const bar = 456; } return bar === 123;
}
§scope shadow resolution
?
function(){
try { { const bar = 456; } const bar = 123; return bar === 123; } catch(e) { return false; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
No
Error
No
No
function(){
try { { const bar = 456; } const bar = 123; return bar === 123; } catch(e) { return false; }
}
§cannot be in statements
?
function(){
const bar = 1; try { Function("if(true) const baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Error
No
Error
No
function(){
const bar = 1; try { Function("if(true) const baz = 1;")(); } catch(e) { return true; }
}
§redefining a const is an error
?
function(){
const baz = 1; try { Function("const foo = 1; foo = 2;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Error
No
Error
No
function(){
const baz = 1; try { Function("const foo = 1; foo = 2;")(); } catch(e) { return true; }
}
§for loop statement scope
?
function(){
const baz = 1; for(const baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Flag
function(){
const baz = 1; for(const baz = 0; false;) {} return baz === 1;
}
§for-in loop iteration scope
?
function(){
var scopes = []; for(const i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Error
Error
Error
Error
function(){
var scopes = []; for(const i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
§for-of loop iteration scope
?
function(){
var scopes = []; for(const i of ['a','b']) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Error
Error
Error
Error
function(){
var scopes = []; for(const i of ['a','b']) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
§temporal dead zone
?
function(){
var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } const qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Error
No
Error
Flag
function(){
var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } const qux = 456; fn(); return passed;
}
§basic support (strict mode)
?
function(){
"use strict"; const foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
"use strict"; const foo = 123; return (foo === 123);
}
§is block-scoped (strict mode)
?
function(){
'use strict'; const bar = 123; { const bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; const bar = 123; { const bar = 456; } return bar === 123;
}
§scope shadow resolution (strict mode)
?
function(){
'use strict'; try { { const bar = 456; } const bar = 123; return bar === 123; } catch(e) { return false; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Flag
No
No
function(){
'use strict'; try { { const bar = 456; } const bar = 123; return bar === 123; } catch(e) { return false; }
}
§cannot be in statements (strict mode)
?
function(){
'use strict'; const bar = 1; try { Function("'use strict'; if(true) const baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; const bar = 1; try { Function("'use strict'; if(true) const baz = 1;")(); } catch(e) { return true; }
}
§redefining a const (strict mode)
?
function(){
'use strict'; const baz = 1; try { Function("'use strict'; const foo = 1; foo = 2;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; const baz = 1; try { Function("'use strict'; const foo = 1; foo = 2;")(); } catch(e) { return true; }
}
§for loop statement scope (strict mode)
?
function(){
'use strict'; const baz = 1; for(const baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; const baz = 1; for(const baz = 0; false;) {} return baz === 1;
}
§for-in loop iteration scope (strict mode)
?
function(){
'use strict'; var scopes = []; for(const i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
'use strict'; var scopes = []; for(const i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
§for-of loop iteration scope (strict mode)
?
function(){
'use strict'; var scopes = []; for(const i of ['a','b']) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
function(){
'use strict'; var scopes = []; for(const i of ['a','b']) { scopes.push(function(){ return i; }); } return (scopes[0]() === "a" && scopes[1]() === "b");
}
§temporal dead zone (strict mode)
?
function(){
'use strict'; var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } const qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } const qux = 456; fn(); return passed;
}

let

§basic support
?
function(){
let foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Flag
function(){
let foo = 123; return (foo === 123);
}
§is block-scoped
?
function(){
let bar = 123; { let bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Flag
function(){
let bar = 123; { let bar = 456; } return bar === 123;
}
§scope shadow resolution
?
function(){
try { { let bar = 456; } let bar = 123; return bar === 123; } catch(e) { return false; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
No
Error
No
No
function(){
try { { let bar = 456; } let bar = 123; return bar === 123; } catch(e) { return false; }
}
§cannot be in statements
?
function(){
let bar = 1; try { Function("if(true) let baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Flag
function(){
let bar = 1; try { Function("if(true) let baz = 1;")(); } catch(e) { return true; }
}
§for loop statement scope
?
function(){
let baz = 1; for(let baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Flag
function(){
let baz = 1; for(let baz = 0; false;) {} return baz === 1;
}
§temporal dead zone
?
function(){
var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } let qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
Flag
function(){
var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } let qux = 456; fn(); return passed;
}
§for/for-in loop iteration scope
?
function(){
let scopes = []; for(let i = 0; i < 2; i++) { scopes.push(function(){ return i; }); } let passed = (scopes[0]() === 0 && scopes[1]() === 1); scopes = []; for(let i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } passed &= (scopes[0]() === "a" && scopes[1]() === "b"); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
Error
No
function(){
let scopes = []; for(let i = 0; i < 2; i++) { scopes.push(function(){ return i; }); } let passed = (scopes[0]() === 0 && scopes[1]() === 1); scopes = []; for(let i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } passed &= (scopes[0]() === "a" && scopes[1]() === "b"); return passed;
}
§for-in loop binding shadowing parameter
?
function(){
try { Function("function f(e) { for (let e in {}) e }"); return true; } catch(e) { return false; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No
function(){
try { Function("function f(e) { for (let e in {}) e }"); return true; } catch(e) { return false; }
}
§basic support (strict mode)
?
function(){
'use strict'; let foo = 123; return (foo === 123);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; let foo = 123; return (foo === 123);
}
§is block-scoped (strict mode)
?
function(){
'use strict'; let bar = 123; { let bar = 456; } return bar === 123;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; let bar = 123; { let bar = 456; } return bar === 123;
}
§scope shadow resolution (strict mode)
?
function(){
'use strict'; try { { let bar = 456; } let bar = 123; return bar === 123; } catch(e) { return false; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Flag
No
No
function(){
'use strict'; try { { let bar = 456; } let bar = 123; return bar === 123; } catch(e) { return false; }
}
§cannot be in statements (strict mode)
?
function(){
'use strict'; let bar = 1; try { Function("'use strict'; if(true) let baz = 1;")(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; let bar = 1; try { Function("'use strict'; if(true) let baz = 1;")(); } catch(e) { return true; }
}
§for loop statement scope (strict mode)
?
function(){
'use strict'; let baz = 1; for(let baz = 0; false;) {} return baz === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; let baz = 1; for(let baz = 0; false;) {} return baz === 1;
}
§temporal dead zone (strict mode)
?
function(){
'use strict'; var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } let qux = 456; fn(); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; var passed = (function(){ try { qux; } catch(e) { return true; }}()); function fn() { passed &= qux === 456; } let qux = 456; fn(); return passed;
}
§for/for-in loop iteration scope (strict mode)
?
function(){
'use strict'; let scopes = []; for(let i = 0; i < 2; i++) { scopes.push(function(){ return i; }); } let passed = (scopes[0]() === 0 && scopes[1]() === 1); scopes = []; for(let i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } passed &= (scopes[0]() === "a" && scopes[1]() === "b"); return passed;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
No
function(){
'use strict'; let scopes = []; for(let i = 0; i < 2; i++) { scopes.push(function(){ return i; }); } let passed = (scopes[0]() === 0 && scopes[1]() === 1); scopes = []; for(let i in { a:1, b:1 }) { scopes.push(function(){ return i; }); } passed &= (scopes[0]() === "a" && scopes[1]() === "b"); return passed;
}
§for-in loop binding shadowing parameter (strict mode)
?
function(){
try { Function("'use strict'; function f(e) { for (let e in {}) e }"); return true; } catch(e) { return false; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
Flag
No
No
function(){
try { Function("'use strict'; function f(e) { for (let e in {}) e }"); return true; } catch(e) { return false; }
}

§block-level function declaration
?
function(){
'use strict'; if (f() !== 1) return false; function f() { return 1; } { if (f() !== 2) return false; function f() { return 2; } if (f() !== 2) return false; } if (f() !== 1) return false; return true;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Flag
function(){
'use strict'; if (f() !== 1) return false; function f() { return 1; } { if (f() !== 2) return false; function f() { return 2; } if (f() !== 2) return false; } if (f() !== 1) return false; return true;
}

functions

arrow functions

§0 parameters
?
function(){
return (() => 5)() === 5;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
function(){
return (() => 5)() === 5;
}
§1 parameter, no brackets
?
function(){
var b = x => x + "foo"; return (b("fee fie foe ") === "fee fie foe foo");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
function(){
var b = x => x + "foo"; return (b("fee fie foe ") === "fee fie foe foo");
}
§multiple parameters
?
function(){
var c = (v, w, x, y, z) => "" + v + w + x + y + z; return (c(6, 5, 4, 3, 2) === "65432");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
function(){
var c = (v, w, x, y, z) => "" + v + w + x + y + z; return (c(6, 5, 4, 3, 2) === "65432");
}
§lexical "this" binding
?
function(){
var d = { x : "bar", y : function() { return z => this.x + z; }}.y(); var e = { x : "baz", y : d }; return d("ley") === "barley" && e.y("ley") === "barley";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
function(){
var d = { x : "bar", y : function() { return z => this.x + z; }}.y(); var e = { x : "baz", y : d }; return d("ley") === "barley" && e.y("ley") === "barley";
}
§"this" unchanged by call or apply
?
function(){
var d = { x : "foo", y : function() { return () => this.x; }}; var e = { x : "bar" }; return d.y().call(e) === "foo" && d.y().apply(e) === "foo";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
function(){
var d = { x : "foo", y : function() { return () => this.x; }}; var e = { x : "bar" }; return d.y().call(e) === "foo" && d.y().apply(e) === "foo";
}
§can't be bound, can be curried
?
function(){
var d = { x : "bar", y : function() { return z => this.x + z; }}; var e = { x : "baz" }; return d.y().bind(e, "ley")() === "barley";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
function(){
var d = { x : "bar", y : function() { return z => this.x + z; }}; var e = { x : "baz" }; return d.y().bind(e, "ley")() === "barley";
}
§lexical "arguments" binding
?
function(){
var f = (function() { return z => arguments[0]; }(5)); return f(6) === 5;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
function(){
var f = (function() { return z => arguments[0]; }(5)); return f(6) === 5;
}
§no line break between params and =>
?
function(){
return (() => { try { Function("x\n => 2")(); } catch(e) { return true; } })();
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
function(){
return (() => { try { Function("x\n => 2")(); } catch(e) { return true; } })();
}
§correct precedence
?
function(){
return (() => { try { Function("0 || () => 2")(); } catch(e) { return true; } })();
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
Error
No
Error
Error
function(){
return (() => { try { Function("0 || () => 2")(); } catch(e) { return true; } })();
}
§no "prototype" property
?
function(){
var a = () => 5; return !a.hasOwnProperty("prototype");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
No
Error
Error
function(){
var a = () => 5; return !a.hasOwnProperty("prototype");
}
§lexical "super" binding in constructors
?
function(){
var received; class B { constructor (arg) { received = arg; } } class C extends B { constructor () { var callSuper = () => super('foo'); callSuper(); } } return new C instanceof C && received === 'foo'
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
var received; class B { constructor (arg) { received = arg; } } class C extends B { constructor () { var callSuper = () => super('foo'); callSuper(); } } return new C instanceof C && received === 'foo'
}
§lexical "super" binding in methods
?
function(){
class B { qux() { return "quux"; } } class C extends B { baz() { return x => super.qux(); } } var arrow = new C().baz(); return arrow() === "quux";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class B { qux() { return "quux"; } } class C extends B { baz() { return x => super.qux(); } } var arrow = new C().baz(); return arrow() === "quux";
}
§lexical "new.target" binding
?
function(){
function C() { return x => new.target; } return new C()() === C && C()() === void undefined;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Error
Error
Error
Error
Error
function(){
function C() { return x => new.target; } return new C()() === C && C()() === void undefined;
}

class

§class statement
?
function(){
class C {} return typeof C === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C {} return typeof C === "function";
}
§is block-scoped
?
function(){
class C {} var c1 = C; { class C {} var c2 = C; } return C === c1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C {} var c1 = C; { class C {} var c2 = C; } return C === c1;
}
§class expression
?
function(){
return typeof class C {} === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
return typeof class C {} === "function";
}
§anonymous class
?
function(){
return typeof class {} === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
return typeof class {} === "function";
}
§constructor
?
function(){
class C { constructor() { this.x = 1; } } return C.prototype.constructor === C && new C().x === 1;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { constructor() { this.x = 1; } } return C.prototype.constructor === C && new C().x === 1;
}
§prototype methods
?
function(){
class C { method() { return 2; } } return typeof C.prototype.method === "function" && new C().method() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { method() { return 2; } } return typeof C.prototype.method === "function" && new C().method() === 2;
}
§string-keyed methods
?
function(){
class C { "foo bar"() { return 2; } } return typeof C.prototype["foo bar"] === "function" && new C()["foo bar"]() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { "foo bar"() { return 2; } } return typeof C.prototype["foo bar"] === "function" && new C()["foo bar"]() === 2;
}
§computed prototype methods
?
function(){
var foo = "method"; class C { [foo]() { return 2; } } return typeof C.prototype.method === "function" && new C().method() === 2;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
var foo = "method"; class C { [foo]() { return 2; } } return typeof C.prototype.method === "function" && new C().method() === 2;
}
§optional semicolons
?
function(){
class C { ; method() { return 2; }; method2() { return 2; } method3() { return 2; }; } return typeof C.prototype.method === "function" && typeof C.prototype.method2 === "function" && typeof C.prototype.method3 === "function";
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { ; method() { return 2; }; method2() { return 2; } method3() { return 2; }; } return typeof C.prototype.method === "function" && typeof C.prototype.method2 === "function" && typeof C.prototype.method3 === "function";
}
§static methods
?
function(){
class C { static method() { return 3; } } return typeof C.method === "function" && C.method() === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { static method() { return 3; } } return typeof C.method === "function" && C.method() === 3;
}
§computed static methods
?
function(){
var foo = "method"; class C { static [foo]() { return 3; } } return typeof C.method === "function" && C.method() === 3;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
var foo = "method"; class C { static [foo]() { return 3; } } return typeof C.method === "function" && C.method() === 3;
}
§accessor properties
?
function(){
var baz = false; class C { get foo() { return "foo"; } set bar(x) { baz = x; } } new C().bar = true; return new C().foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
var baz = false; class C { get foo() { return "foo"; } set bar(x) { baz = x; } } new C().bar = true; return new C().foo === "foo" && baz;
}
§computed accessor properties
?
function(){
var garply = "foo", grault = "bar", baz = false; class C { get [garply]() { return "foo"; } set [grault](x) { baz = x; } } new C().bar = true; return new C().foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
var garply = "foo", grault = "bar", baz = false; class C { get [garply]() { return "foo"; } set [grault](x) { baz = x; } } new C().bar = true; return new C().foo === "foo" && baz;
}
§static accessor properties
?
function(){
var baz = false; class C { static get foo() { return "foo"; } static set bar(x) { baz = x; } } C.bar = true; return C.foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
var baz = false; class C { static get foo() { return "foo"; } static set bar(x) { baz = x; } } C.bar = true; return C.foo === "foo" && baz;
}
§computed static accessor properties
?
function(){
var garply = "foo", grault = "bar", baz = false; class C { static get [garply]() { return "foo"; } static set [grault](x) { baz = x; } } C.bar = true; return C.foo === "foo" && baz;
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
var garply = "foo", grault = "bar", baz = false; class C { static get [garply]() { return "foo"; } static set [grault](x) { baz = x; } } C.bar = true; return C.foo === "foo" && baz;
}
§class name is lexically scoped
?
function(){
class C { method() { return typeof C === "function"; } } var M = C.prototype.method; C = void undefined; return C === void undefined && M();
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { method() { return typeof C === "function"; } } var M = C.prototype.method; C = void undefined; return C === void undefined && M();
}
§computed names, temporal dead zone
?
function(){
try { var B = class C { [C](){} } } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
try { var B = class C { [C](){} } } catch(e) { return true; }
}
§methods aren't enumerable
?
function(){
class C { foo() {} static bar() {} } return !C.prototype.propertyIsEnumerable("foo") && !C.propertyIsEnumerable("bar");
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { foo() {} static bar() {} } return !C.prototype.propertyIsEnumerable("foo") && !C.propertyIsEnumerable("bar");
}
§implicit strict mode
?
function(){
class C { static method() { return this === void undefined; } } return (0,C.method)();
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C { static method() { return this === void undefined; } } return (0,C.method)();
}
§constructor requires new
?
function(){
class C {} try { C(); } catch(e) { return true; }
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class C {} try { C(); } catch(e) { return true; }
}
§extends
?
function(){
class B {} class C extends B {} return new C() instanceof B && B.isPrototypeOf(C);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error
Error
Error
Error
Error
Error
function(){
class B {} class C extends B {} return new C() instanceof B && B.isPrototypeOf(C);
}
§extends expressions
?
function(){
var B; class C extends (B = class {}) {} return new C() instanceof B && B.isPrototypeOf(C);
}
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Yes
Error
Flag
Error