Created
January 30, 2024 20:39
-
-
Save jeankassio/7e30e98d8af5ba8d6b326bacfe5c9382 to your computer and use it in GitHub Desktop.
Check support to ES6
This file contains hidden or 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
function isES6Supported() { | |
try { | |
new Function("(a = 0) => a"); // Testa a existência de arrow functions | |
return true; | |
} catch (exception) { | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment