Both:

var pixel = gl.readPixels(1,1,1,1,gl.RGBA,gl.UNSIGNED_BYTE);

and:

var pixel;
gl.readPixels(1,1,1,1,gl.RGBA,gl.UNSIGNED_BYTE, pixel);

evaluate pixel to "undefined"