Drawing Sierpinski's triangle with JavaScript