+ 1
text in loops
can i i use a text string in a loop like for(text=""){ document.write(text); }
8 Antworten
+ 4
You can use numbers in for loop. Strings cannot be used here
+ 1
As far as i know...You can't. Dang I never even tried this..😂
0
You wrong... Its possible use ANY boolean expression and if in expression are involved string its same:
var s=""
for(; s!="111"; ){
s+= "1"
console.log(a)
}
0
Cyia Can you explain better your question? What to you do want?
0
thanks Krow and Akib.. i want to use a string and not a number..like a list of names thats going to execute a loop of names starting with A when a user inputs A
0
I think you need conditional statements. You can also loop through an array of characters.
0
so can you help what is after x<=