Created
November 16, 2015 22:55
-
-
Save Comandeer/f663d338a161c6e2817e to your computer and use it in GitHub Desktop.
IIFE example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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