Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: why the ! operator can be used to determine a string is null? Date: Wed, 09 Aug 2017 16:14:04 +0100 Organization: A noiseless patient Spider Lines: 21 Message-ID: <87zib8g4eb.fsf@bsb.me.uk> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="6b106f5f939d4678e293715be9be63dc"; logging-data="5571"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VP1zQeKbJ7nrKzCxyLplBJaQGYoNOqsw=" Cancel-Lock: sha1:hQCNbG0iMl7ktl3QaN0wCiAeQ0c= sha1:XP73WDJbAuZ2y4bGRhqkkqXVaco= X-BSB-Auth: 1.2467708ad2689b0d589d.20170809161404BST.87zib8g4eb.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:33730 "Evertjan." writes: > Jon Ribbens wrote on 09 Aug 2017 in > comp.lang.javascript: > >> Unfortunately people tend to be very imprecise as to the meaning of >> the phrase "null string", and may variously mean either the actual >> null value or an empty string. > > Indeed, > a string is NEVER null, > because then it is NOT a string. Further complicated by the fact that there is a character called null (sometimes Null, Nul or NULL) so a string can "be null" in that it contains just that character. It's not a clear way to speak about such things but we're all guilty of using short-hands now and again. -- Ben.