var fragmentShaderSource = '\
varying highp vec4 color; \
varying mediump vec2 texCoord;\
varying highp vec3 v; \
varying highp vec3 n; \
uniform sampler2D sampler2d;\
void main(void) \
{ \
gl_FragColor = color + 0.0 * texture2D(sampler2d, texCoord); \
gl_FragColor.a = 1.0; \
console.log(color); \
} \
';
I'm new to WebGL, and the strange thing about this is, how is it possible to use variables like color or sampler2d although I didn't Initialize anything? Is there a default value?

varyingparameters have an initial value that is predetermined by interpolating the matchingvaryingparameter from the vertex shader.uniformparameters are set externally from the shader before it is used for rendering.