Daftar Lembar Cheat JavaScript
// before -- [_,_,NEW,REF,_,_]
list.splice(list.indexOf(REF), 0, NEW))
DevLorenz02
// before -- [_,_,NEW,REF,_,_]
list.splice(list.indexOf(REF), 0, NEW))
.map(n => ...) // ie9+
.reduce((total, n) => total) // ie9+
.reduceRight(...)
re = list.splice(1) // re = [b,c,d,e] list == [a]
re = list.splice(1,2) // re = [b,c] list == [a,d,e]
// after -- [_,_,REF,NEW,_,_]
list.splice(list.indexOf(REF)+1, 0, NEW))
list.splice(2, 1, X) // list == [a,b,X,d,e]
.every(n => ...) => Boolean // ie9+
.some(n => ..) => Boolean // ie9+
list = [a,b,c,d,e]
list.push(X) // list == [_,_,_,_,_,X]
list.unshift(X) // list == [X,_,_,_,_,_]
list.splice(2, 0, X) // list == [_,_,X,_,_,_]
.filter(n => ...) => array