localStorage undefined | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

localStorage undefined

If the locaStorage is undefined, how do I make the text (e.g Time Set = undefined) below the button a blank text? I’ve tried using If (typeof Storage !== ‘undefined’){ ........ } else{ document.get......=“ “; } as seen in the commented section of the code. https://code.sololearn.com/W9YwkjdDJfj6/?ref=app

12th Apr 2020, 2:37 PM
Qi Qing Lim
Qi Qing Lim - avatar
2 Answers
+ 1
Qi Qing Lim On sololearn there is "NO" localstorage and sessionstroage.
12th Apr 2020, 3:21 PM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
12th Apr 2020, 4:17 PM
Ipang