Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

is empty string falsy

// This is dependent on the language you are using.
// In most high-level-languages (like JavaScript or Python) they are falsy.
if (""){
	console.log("This will never execute")
}

// However many low-level-languages (like C or C++) they are truthy, because
// they are just a pointer to some container, and a pointer that doesn't
// point to null is truthy.
 
PREVIOUS NEXT
Tagged: #empty #string #falsy
ADD COMMENT
Topic
Name
4+1 =