DEV Community

DONAL
DONAL

Posted on

LOCAL STORAGE

localstorage A GUIDE

Yes! My 2 posts reach to >500 posts, so here’s my new font and I am using dark theme and I am very happy 😃 so this is a video to make at will ! About localStorage how to use it and at first what localStorage is exactly is ?

local storage is simply one of the value storing method in JavaScript. So actually when you create Variable and give it a value 10. So you create a button and when you click it you give a function and the that function creates is that it just increases the value of our previously created variable’s value with 1 so , you like this clicking this button you reached the value to hmm 🤔 15 right! And now refresh it. Check the value of the variable in the console oh what! It is again 10 why not 15 it is 10 because Javascript did not store it’s value. So there are many ways to store them like cookies 🍪, Servers & ofcourse localStorage.

Ok 👍 now good we understood what is localStorage right ! So know what is it ? It is just a method to store values in Javascript so now where does all our values go ?

localStorage can be used very simply so now we can store values right and where do they get stored ? Yes.... they get stored in the browser so if a value is stored in localStorage it can be used in any of the webpages in the whole whole World Wide Web 🌍

Yeah! So know I teached you what is localStorage ! So in the article you are going to see how to use it and in one of the upcoming articles we will also see how to create a chat app with it obviously we can’t messages from one COMPUTER to OTHER but can store them. So alright folks we’ll meet again

Top comments (0)