i have a variablenthat refuses to count can anyone help??? its var st, it counts to 2 and stops, regardless of the interval set | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

i have a variablenthat refuses to count can anyone help??? its var st, it counts to 2 and stops, regardless of the interval set

varialble wont obey interval https://code.sololearn.com/WTsWC6RCbnOw/?ref=app

21st Aug 2019, 12:31 PM
Escobar
Escobar - avatar
6 Answers
+ 2
https://code.sololearn.com/WQIg7DFv9FFk/?ref=app
22nd Aug 2019, 6:26 AM
Calviղ
Calviղ - avatar
+ 1
a[0] is the first element of #lafoto. b[++st] increment st variable by 1 before b array refer to which mean get the url after st pointer points to next array element. Subtract the length by 1 due to array index count from 0. You code cannot run due to you added the javascript attribute.
22nd Aug 2019, 1:33 PM
Calviղ
Calviղ - avatar
0
hey thanks a bunch, id like to understand my mistake if its ok, you gave my a variable an array count instead of my b variable? but you gave the array count a job to do with the b[++st] ????
22nd Aug 2019, 12:39 PM
Escobar
Escobar - avatar
0
wait, i just saw you changed the value of a variable too... u subtracted the length
22nd Aug 2019, 1:09 PM
Escobar
Escobar - avatar
0
i also saw you removed the javascript attribute from my script tag
22nd Aug 2019, 1:14 PM
Escobar
Escobar - avatar
0
sabes espanol?
22nd Aug 2019, 2:03 PM
Escobar
Escobar - avatar