I need to create a while loop that I sent a message x number of times to the console.
var loop = function(){
while(){
console.log("");
}
}
loop();
I need to create a while loop that I sent a message x number of times to the console.
var loop = function(){
while(){
console.log("");
}
}
loop();
Just create a condition:
var loop = function(x) {
qtd = 0;
while (qtd < x) {
console.log("Mensagem #" + qtd);
qtd++;
}
}
loop(10);