+ 1

Is this code valid?

var age = [3,5,7,8,9,3]; for (i=0; i< age.length; i++) { age[i] *=3; alert (age); } Why does it fail to output anything?

19th Jun 2018, 11:50 AM
Naldo
Naldo - avatar
4 Respuestas
+ 5
The code has no errors. It is working properly and outputs six alerts
19th Jun 2018, 1:06 PM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 2
Try alert(age[i])?
19th Jun 2018, 12:21 PM
Andre Daniel
Andre Daniel - avatar
+ 2
It works for me...
19th Jun 2018, 12:34 PM
Russ
Russ - avatar
+ 1
Thank you guys. I have got it. It works now
19th Jun 2018, 1:52 PM
Naldo
Naldo - avatar