change image function

I want to test my code with the python function and I change the js in src/lib/image
```
import image
//CREATE AN IMAGE FROM A FILE
img = image.Image("arch.jpg")
// CLEAR THE RED FROM ALL PIXELS
pixelList = img.getPixels()
count = 0
for p in pixelList: 
        p.setRed(0)
        img.setPixelAt(count,p)
	count+=1
win = image.ImageWin()
img.draw(win)
```
but the current problem is that the array I return does not contain the right pixel.
Any suggestions will be appreciated
like @bnmnetp said this should be `var arr = [];` but wouldn't it be easier or better to understand to put the image in a two dimensional array? I don't think performance wise javascript would mind all that much.