Share data ( variable, array) between two canvas

Hi ive been googleing, but im asking if there is any trick or way to share info, for example object, variables, arrays between two sketches.

Lets say i have one game in one canvas inside a div id=“game”… but in other place of my html file i want to put or write some kind of scoreboard, showing the score and time and lifes left… So is there any “global” variable that i can use ? To interchange data

Or when game is finish, in the scoreboard place i want to show a message Game Over
Thanks

2 Likes