scenario: two pages are independent of each other, and the JavaScript code in them executes independently of each other. The js of these two pages share a common variable shareArray array in localStorage
Action
1, page A stores a piece of data in shareArray
2, page B deletes a piece of data from shareArray
question:
from the above point of view, it has satisfied the concurrency problem caused by adding and modifying a common variable at the same time in case of multiple concurrency. What I want to know is how the front end handles such a problem and ensures data consistency in extreme cases