your for loop syntax is incorrect...
you have for( var = 0; i < names.lenght; i++)
There are two things wrong.
- You're declaring a variable without a name (var =0; , should be var i = 0;)
- You misspelled length
thanks man it's working now