Skip to content

Instantly share code, notes, and snippets.

@szuend
szuend / accessor-adds-two-elements.js
Created September 19, 2019 05:36
Array#sort spec change: various test cases
function log(array) {
let buf = '';
for (let index = 0; index < array.length; index++) {
if (array.hasOwnProperty(index)) {
buf += String(array[index]);
} else {
buf += 'hole';
}
if (index < array.length - 1) buf += ',';
}