Because this code will fail at the shader-compilation stage, with the error message :'[]': index expression must be constant. 
I will find a better way to access array for webGL.