cara memeriksa apakah penyimpanan lokal tersedia

if (typeof(Storage) !== "undefined") 
{ 
	console.log("localStorage is available."); 
} 
else 
{ 
	console.log("localStorage is not supported by current browser."); 
} 
Yucky Yak