Is it a good idea to create loops only using [functions] instead of traditional [for/while loops]? Is it a good practice? example:
var paper = document.getElementById("paper");
var indexC = 1;
function ciclo(){
indexC++;
paper.innerHTML += (indexC + " ");
if(indexC < 1000){
ciclo();
}
}
ciclo();
for
loop would be better. P.S. this is called "recursion". – Rocket Hazmat Nov 7 '13 at 18:43