JS function to produce a triangle of numbers.