for (var i = 4; i <= 4; --i) {
var str = "";
for (var j = 4; j <= 4; --j) {
str = str + " " + j;
}
console.log(str);
}
//why below line is not printing in console?[enter image description here][1]
console.log("another Pattern");
for (var k = 4; k >= 1; ++k) {
var str = "";
for (var l = 4; l <= 1; ++l) {
str = str + "" + k;
}
console.log(str);
}
You are creating two infinite loops above. The counting variables i and j always meet the condition equal or less 4. The console output line below the comment is never reached.