Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alecmce/337965 to your computer and use it in GitHub Desktop.
Save alecmce/337965 to your computer and use it in GitHub Desktop.
// 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