implement --module (#5462)

This commit is contained in:
Alex Lam S.L
2022-05-23 22:45:47 +01:00
committed by GitHub
parent 740f93f5a9
commit c82fc1ef71
8 changed files with 45 additions and 12 deletions

View File

@@ -0,0 +1 @@
function n(){return this||arguments[0]+arguments[1]}function o(){return this||arguments[0]+arguments[1]}console.log(n(n(1,3),5)),console.log(o(o(2,4),6));

View File

@@ -0,0 +1,13 @@
console.log(function() {
function sum(...params) {
return this || arguments[0] + arguments[1];
}
return sum(sum(1, 3), 5);
}());
console.log(function() {
"use strict";
function sum(...params) {
return this || arguments[0] + arguments[1];
}
return sum(sum(2, 4), 6);
}());