I need to develop a code where I do not have access to back-end languages, I need to do a function that calculates how long a user is online on the page and save this time in localStorage in>, I thought I'd use a setInterval
every 1 second to update the time that it's online . And then update the value in storage, however I do not know how to work with Javascript / jQuery time. How could I do that?