code: function createShaderProgram(gl, shaders) {
    const program = gl.createProgram();
  
    for (let i = 0; i < shaders.length; i++) {
      gl.attachShader(program, shaders[i]);
    }
  
    gl.linkProgram(program);
  
    // Check the link status
    const linked = gl.getProgramParameter(program, gl.LINK_STATUS);
    if (!linked) {
      // something went wrong with the link
      const lastError = gl.getProgramInfoLog(program);
      console.error('Error in program linking:', lastError);
      gl.deleteProgram(program);
  
      return null;
    }
  
    program.shaders = shaders;
    gl.useProgram(program);
  
    return program;
  }
docs: Create a shader program