Closed nalin243 closed 1 year ago
Explain your code
First of all I divided the page into two parts left and right and put the leader board table on the left. As for the js section, every time a user reloads the page they are asked for their username. When they win, the code checks whether this user object is in the sessionStorage or not. If it's present then it simply updates the score in the storage and then displays the storage in the form of leader board or it first adds the new user and then displays the leader board.
updateStorage() updates the sessionStorage updateLeaderBoard() basically displays the leaderboard array
The leader board is done.