my vertex buffer has positions which are not normalised ... ie

gl.bufferData(gl.ARRAY_BUFFER, vertices2,gl.STATIC_DRAW);

var posBuffer = gl.createBuffer();
gl.bindBuffer(gl.ARRAY_BUFFER,posBuffer);

var vertices2 = new Float32Array([-15.000,30.256,-3.893,17.370 etc ..... ]);


i want to know how i can divide every element of my array by 3 or any other factor so that the vertices will fit into my canvas .. what it the javascript program to get the no. of elements in my array and divide all of them by a certain factor ... any help would be appreciated .. thank you ..