Skip to content

Instantly share code, notes, and snippets.

@Comandeer
Created November 16, 2015 22:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Comandeer/f663d338a161c6e2817e to your computer and use it in GitHub Desktop.
Save Comandeer/f663d338a161c6e2817e to your computer and use it in GitHub Desktop.
IIFE example
var isLocalStorageSupported = (function()
{
try
{
localStorage.setItem('test', 'test');
localStorage.removeItem('test');
return true;
}
catch(e)
{
return false;
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment