Javascript for simple grid puzzle?

I’m trying to create a simple grid puzzle using Javascript, which I’ve just started to learn. The grid would consist of many blocks that can be combined to create new types of block.

Example: Block Type A is dragged over Block Type B to create Block Type C. Blocks A and B are destroyed - Block C instantiates in the place of Block B.

I know the basics of destroying and instatiating prefabs on collision, etc, but if someone could give me some pointers on how to set up the initial grid, that would be great. I also don’t know how to implement the click-and-drag mechanic.


Some resources to get you started:

Good Luck.