'Save mapbox to localstorage

I'm building an web app using mapbox api for college. I'm currently only using html and JS files. Now I got the map working with start and end. What I need to do is save the search into local storage and I can't find any document that supports this



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source