0
Using java script pls can i create loops without ysing number pls if so pls tell how
Pls answer
3 Antworten
+ 4
Do you mean, you want to just iterate over an iterable without using an index variable, like you can do it for example in Python?
In Javascript, that may look like this:
numbers = [5, 3, 7, 1, 9];
for(x of numbers)
console.log(x);
+ 2
What is the idea about loop without number, can you elaborate on that? as I understand it, loop uses a specific condition to realise when it should stop. So how to know when the loop should stop without using a number?