Random Color Matrix (Vanilla JS)

Build a grid of randomly colored cells that can be regenerated and recolored on click.

Asked in Flipkart frontend interviews