Last active
February 2, 2017 08:28
-
-
Save xexi/c323f14b2cf2cd24c3374a52a0aa9ff9 to your computer and use it in GitHub Desktop.
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
| var arr = []; | |
| // for any falsy value (0, "", NaN, null, undefined, or of course, false): | |
| if (!myarray[0]){ | |
| // isEmpty | |
| } else { | |
| // notEmpty | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment