Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #26936

Re: What's wrong with this code?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: What's wrong with this code?
Date Thu, 26 Feb 2015 12:17:01 +0100
Organization PointedEars Software (PES)
Lines 19
Message-ID <1462385.MiWHP334DG@PointedEars.de> (permalink)
References <b2751271-cbda-4bcd-9217-a37eb3fa58b0@googlegroups.com> <typeof-20150226120428@ram.dialup.fu-berlin.de>
Reply-To Thomas 'PointedEars' Lahn <cljs@PointedEars.de>
Mime-Version 1.0
Content-Type text/plain; charset="UTF-8"
Content-Transfer-Encoding 8Bit
X-Trace solani.org 1424949501 14811 eJwVycERACEIBLCWwGURykGF/ku4uXxDuPrd5nTjcKDz3lEppKb1Xu1c8X9TatWFHAENzpyQ+AAMrxAM (26 Feb 2015 11:18:21 GMT)
X-Complaints-To abuse@news.solani.org
NNTP-Posting-Date Thu, 26 Feb 2015 11:18:21 +0000 (UTC)
User-Agent KNode/4.14.2
X-User-ID eJwFwQEBwCAMAzBLh7bbkAOM+pfwRIgRNxkKynIx90RuPIrAsnkLa2qZLvS74HqiBhvsUS2PZp55/DnyBzShFPA=
Cancel-Lock sha1:idR4aeAjKRY0lKv2XhpUiabLIrg=
X-NNTP-Posting-Host eJwNyckBwDAIA7CVWgwmjEM49h+h1VcGvixXGtXWthM3Zl0EcfKxg3adnasZbsQIg4Vm1crfHyGgERg=
Xref csiph.com comp.lang.javascript:26936

Show key headers only | View raw


Stefan Ram wrote:

> denissavenok@gmail.com writes:
>> var isUndefinedOrNull = function(obj) {
>>        return /^(?:undefined|null)$/.test(typeof obj);
>> };
> 
> // This stands since the beginning of JavaScript
> typeof null === 'object';

Except that in the first JavaScript/JScript versions there was no “===” 
operator :)  But using “==” instead does not change the semantics of this 
expression as the operands have the same type (String).

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

What's wrong with this code? denissavenok@gmail.com - 2015-02-26 01:18 -0800
  Re: What's wrong with this code? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-26 12:17 +0100
  Re: What's wrong with this code? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-02-26 14:25 +0000
    Re: What's wrong with this code? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-26 16:04 +0100
      Re: What's wrong with this code? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-02-26 15:37 +0000
        Re: What's wrong with this code? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-02-26 17:09 +0100
  Re: What's wrong with this code? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-02-26 14:09 -0300

csiph-web