Closed krohne closed 8 years ago
http://jsperf.com/swap-two-numbers-without-tmp-var/19
Array Destructuring (ES6) [a, b] = [b, a];
Chrome and Firefox can run the ES6 code in the console, but jsperf.com throws an error.
Firefox:
TypeError: P(...)[0] is undefined. message: TypeError: P(...)[0] is undefined fileName: http://jsperf.com/benchmark-47.js lineNumber: 21
TypeError: P(...)[0] is undefined.
message: TypeError: P(...)[0] is undefined fileName: http://jsperf.com/benchmark-47.js lineNumber: 21
Chrome:
Uncaught TypeError: Cannot read property 'name' of undefined. message: Uncaught TypeError: Cannot read property 'name' of undefined fileName: http://jsperf.com/benchmark-47.js lineNumber: 21
Uncaught TypeError: Cannot read property 'name' of undefined.
message: Uncaught TypeError: Cannot read property 'name' of undefined fileName: http://jsperf.com/benchmark-47.js lineNumber: 21
Dup of https://github.com/jsperf/jsperf.com/issues/66.
http://jsperf.com/swap-two-numbers-without-tmp-var/19
Array Destructuring (ES6) [a, b] = [b, a];
Chrome and Firefox can run the ES6 code in the console, but jsperf.com throws an error.
Firefox:
Chrome: