My goal is to create tables where each cell changes its class upon being clicked.
As I set up the table, I want to track the history of clicked cells in an array.
Currently, the history array is stored in the 'clicked' array:
array=[1,4,6,9]
However, my desired result would be:
array=[[1,2,3,4],[6,7,8,9]]
or
array=[[1,4],[6,9]]
Essentially, I wish to obtain parent keys for manipulation with each class change.
If you have any suggestions or recommendations, please feel free to share them.