Which of the following functions properly removes all green and blue from a pixel and returns the modified pixel?

var RED = 0;
var GREEN = 1;
var BLUE = 2;
function removeGreenAndBlue(pixel) {
pixel[RED] = 255;
return pixel;
}

var RED = 0;
var GREEN = 1;
var BLUE = 2;
function removeGreenAndBlue(pixel) {
pixel[GREEN] = 0;
pixel[BLUE] = 0;
return pixel;
}

var RED = 0;
var GREEN = 1;
var BLUE = 2;
function removeGreenAndBlue(pixel) {
pixel[GREEN] = 0;
pixel[BLUE] = 0;
}

function removeGreenAndBlue(pixel) {
pixel.setGreen(0);
pixel.setBlue(0);
return pixel;
}

The second function properly removes all green and blue from a pixel and returns the modified pixel.