Hello,
I am new to Wix and not a coder either.
I am trying to run a for loop that would print out every count result to a text box with a new line break, but I'm not able to get it done.
below is my code.
I appreciate any help, guidance, or another approach to achieve this.
Thank you.
for (h=6; h>=0; h=h-1) { var j for (j=0; j<h; j=j+1) { $w('#text135').text = "1"; console.log("hello") } $w('#text135').text = "\n" console.log("hello end") }
looking for result
111111
11111
1111
111
11
1
Or you need something like this one...?
var myValues = ["Hello", "World", "hello", "Velo-Coding"] var myText = "" $w.onReady(function () { xxx() }); function xxx(){ for (var a = 0; a < myValues.length; a++) { myText = myValues[a]+`"\n"` console.log(myText) $w('#text1').text = $w('#text1').text+myText } }
Do not forget to create a TEXTFIELD with the following ID ---> "text1"
Run this CODE and take a look into CONSOLE.
var fff = "1" $w.onReady(function () { xxx() }); function xxx(){ for (var a = 1; a < 10; a++) { let zzz = a/a fff = fff+zzz.toString() console.log(fff) } }