JSFiddle - React, Tailwind, and code Playground
by magikMaker
JavaScript
var x = true;
var y = [
['a1', 'a2', 'a3', 'a4', 'a5'],
['b1', 'b2', 'b3', 'b4', 'b5', 'b6'],
['c1', 'c2', 'c3', 'c4', 'c5', 'c6', 'c7'],
['d1', 'd2', 'd3']
];
var cont = true;
var z = [];
var safety = 0;
var xx = y.map((row, i) => {
y[i] = row.filter(rr => {
return !(rr.match(/3/));
});
return 'x';
});
var merged = [].concat.apply([], y);
console.log('y', merged, y);
/*
while(cont) {
z.push(y.filter(i => {
cont = i.length > 0;
var item = i.shift();
console.log('>>> ', item, (new Date()).getTime());
if(item){
return item;
}
}));
++safety;
cont = !(safety > 30);
}
var merged = [].concat.apply([], z);
*/
//console.log('>>> ', y.map(() => {}), z, merged);
console.log('>>> ', xx);
/*
var z = 8;
y.every(test => {
while(test.length && x){
console.log('>>> 1', test);
if(test > z){
// break
x = false;
console.log('>>> 2 ', test);
return false;
}
return true;
}
console.log('>>> 3');
});
*/