Drawing an image pixel by pixel through javascript and updating on website

Currently, I have a temporary picture (10x10 scaled up to 500 x 500) that is hidden until the user presses the button.

Also, I have an int array of length 300 for 300 RGB values for the 100 pixels (100 of 3 tuples). Is there a way to draw such an image given this array and update the hidden image? I have been looking into javascript canvas and other elements and was wondering if there are any other ways?