Believe It or Not: Interviewer Asks Me to Calculate LocalStorage Capacity Using JavaScript!
Published in
5 min readMay 8, 2024
We all have heard that LocalStorage boasts a capacity of 5MB, but how many of us have actually verified it? It’s one of those common knowledge pieces that we take for granted. However, there are scenarios where knowing how to calculate the remaining capacity of LocalStorage becomes crucial. Imagine you’re in the middle of a job…