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: Thu, 10 Aug 2017 15:08:40 +0100 Organization: A noiseless patient Spider Lines: 27 Message-ID: <87efsjcy6v.fsf@bsb.me.uk> References: <87zib8g4eb.fsf@bsb.me.uk> <87zib8e5dl.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="095bb2b259dd0e10cf340db4dcb09e7e"; logging-data="6582"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/S+sPtjsQGkUreVPWsIpd5oIz7FePCgu4=" Cancel-Lock: sha1:s9WMq4kzbgfQ/CfY5DeL4VEUh48= sha1:Dco7hmSAGDzWTpUlYfl78TpgHWY= X-BSB-Auth: 1.81464e1325b21a163527.20170810150840BST.87efsjcy6v.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:33759 "Evertjan." writes: > Ben Bacarisse wrote on 10 Aug 2017 in > comp.lang.javascript: > >> Of course not. I was talking about a string with a single NULL >> character in it (was the not clear?). > > Indeed, you were. > > But that does not change the meaning of a null-string, > which in Javascript does not exist, > since the value of a variable being null is an object, > not a string. Of course not. No one has argued otherwise. All I said was that the presence of yet another meaning for the word "null" adds to the confusion (for some people). > I doubt that there is a "null-character" anyway, > as it forgoes on the idea of a character in the same way. Unicode uses the term "character" for all sorts of things you might not consider characters. NULL is only one of these peculiar creatures. -- Ben.