Check if a key exists in localStorage
To check for an item, get the value of the item by querying localStorage by its key.
To check for an item, get the value of the item by querying localStorage by its key.
Loose and strict equality operators help us test for a similarity between bits of data.