Triangles JavaScript