I wonder if it is possible to call these 2 IIF synchronically that they produce at the end something like that?
######
#####
####
###
##
#
#
##
###
####
#####
###### ?
the functions below do delayed console log. The idea is to console log with some delay row by row.
(function whileLoop(n) {
setTimeout(function () {
let hashArr = Array.apply(null, Array(n)).map(() => {
return hashSymbol
});
console.log(hashArr);
if (--n) whileLoop(n);
}, 2000)
})(6);
(function whileLoop(n, m) {
setTimeout(function () {
let hashArr = Array.apply(null, Array(n)).map(() => {
return hashSymbol
});
console.log(hashArr);
if (n < m) {
++n;
whileLoop(n, m);
}
}, 2000)
})(1, 6);