JavaScript Game Development Tutorial [How to use Local Storage]

Have you ever built an ad-don? Let’s start simple and learn how to use local storage in the process.

In today’s JavaScript game development tutorial for beginners we will create a plugin that tracks, updates and stores high score. We will also talk about logical operators in JavaScript (OR/AND/NOT) and other fundamental vanilla JavaScript techniques and principles that are useful not only for games, but also for building websites, generative art and will help you master everything you need to know to pass your first coding interview. Let’s have fun with code again 🙂

Relevant links: PART 1 –
Logical operators in JavaScript explained: (OR/AND/NOT)…
JavaScript Understanding the Weird Parts – course for beginners that goes deep into how everything in JavaScript works. One of the best JS courses ever made: the first 3.5 hourse are FREE on Youtube (Udemy link for full 12 hour course)

With JavaScript we can access and store data in built in browser Storage object in two ways. We can use so called session storage, which will remember our stored variables and their values between page reloads, as long as browser remains open. When you close your browser, session storage deletes all data. Local storage does the same thing, it persists our data between page reloads, but also when we close and reopen the browser. Data stored in local storage has no expiration date. It can only be cleared with JavaScript methods I will show you in this tutorial or through clearing browser cache and locally stored data.

Have fun 🙂

One comment

  1. Hi Frank, I am loving all your video tutorials, the techniques you show are amazing. I have been self learning front end web development since April (2020) this year, when we went in to lockdown. I am really enjoying learning so many new things from your lessons. But I have to say that your videos just inspire me to learn even more. Thank you so much Frank.

Leave a Reply