4 ms·
It is actually a forever/infinite loop unless you break out of it with code like this: var i = 0; for (;;) { log(i); i++; if (i > 10)
by yannis 17y ago
It is actually a forever/infinite loop unless you break out of it with code like this:
var i = 0;
for (;;) {
log(i);
i++;
if (i > 10) {
break;
}
};
In a way is recursion, it is equivalent to this:
var i = 0;
(function () {
log(i);
i++;
if (i > 10) {
return;
}
arguments.callee();
})();