Your task is to extend the functionality of the generatePattern(style, dimensions) function to support a new pattern type: alternating rectangle.
For this assignment, the style parameter will be "alternating-rectangle", and the dimensions parameter will be an array [columns, rows] where:
columnsis the number of columns in the rectangle.rowsis the number of rows in the rectangle.