-
-
Save alecmce/337965 to your computer and use it in GitHub Desktop.
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
// meh... | |
var iAmAStringInstance :String = ""; | |
var iAmANullString :String = null; | |
if(iAmAStringInstance) | |
{ | |
trace("iAmAStringInstance is neither null nor empty"); | |
} | |
else | |
{ | |
trace("iAmAStringInstance is either null or empty"); | |
} | |
if(iAmANullString) | |
{ | |
trace("iAmANullString is neither null nor empty"); | |
} | |
else | |
{ | |
trace("iAmANullString is either null or empty"); | |
} | |
// Trace outputs: | |
// | |
// iAmAStringInstance is either null or empty | |
// iAmANullString is either null or empty | |
// | |
// Right. Not particularly good, but not particularly bad either. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment