I understand that the answer to this is it's in the specs but what, if any, is the logic behind it?
Welcome to Node.js v19.0.0.
Type ".help" for more information.
> !!''
false
> !![]
true
A String, to my understanding, is really an array with some extra functionality added to make text easier to work with, it still does all the array-like things though so why is an empty string falsey but an empty array is truthy?
nullis an object, too. but not truthy.nullis not an object, but a primitive. It hastypeofequal to"object", but that is a different story.mystring[0]but you can't add characters withmystring.push("end"). Note that strings are immutable. See this question for more info on strings.