var Ak=[
[[1,2,3],[0,0,0],[0,0,0]],
[[0,0,0],[0,0,0],[0,0,0]],
[[0,0,0],[0,0,0],[0,0,0]]
];
alert(A[0][0][0]);
window.DU = {
purifyFallback: function(cb) {
let fallback = typeof cb === 'undefined'
? function(idx) { return idx }
: typeof cb !== 'function'
? function() { return cb }
: cb;
return fallback;
},
mkarr: function(len, cb) {
let arr = [];
let fallback = this.purifyFallback(cb);
while(len-- > 0) arr.unshift(fallback(len));
return arr;
},
mk2arr: function(len, cb) {
let fallback = this.purifyFallback(cb);
let len_0 = len;
return this.mkarr(len, function(len) {
return this.mkarr(len_0, fallback(len_0, len));
}.bind(this))
},
mk3arr: function(len, cb) {
let fallback = this.purifyFallback(cb);
let len_0 = len;
return this.mkarr(len, function(len) {
let len_1 = len;
return this.mkarr(len_0, function(len) {
return this.mkarr(len_0, fallback(len_0, len_1, len));
}.bind(this));
}.bind(this))
},
makeYourExample: function() {
let matched = this.mkarr(3);
return this.mk3arr(3, function(idx_0, idx_1, idx_2) {
console.log(idx_0, idx_1, idx_2)
return idx_1 === 0 && matched.indexOf(idx_2) !== -1 ? (idx_2 + 1) : 0;
}.bind(this));
}
};