Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27329
| 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: Puzzling JS Error |
| Date | Sun, 12 Apr 2015 01:01:27 +0200 |
| Organization | PointedEars Software (PES) |
| Lines | 38 |
| Message-ID | <6827636.tojzTVapKU@PointedEars.de> (permalink) |
| References | <consduF625qU1@mid.individual.net> <n3f8szim8ehd.j3con3004nis.dlg@40tude.net> <1798717.ojboOnzLPd@PointedEars.de> <mgc2hl$e88$1@speranza.aioe.org> <2172415.g2VhMMEByA@PointedEars.de> <mgc75b$or6$1@speranza.aioe.org> |
| 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 1428793414 18357 eJwNyskRACEIBMCUxGHADYflyD8Erf42YWLpajTlcFJ3CSxXwRke64F4NA43fn+r5IR6j36RfQERUBDv (11 Apr 2015 23:03:34 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Sat, 11 Apr 2015 23:03:34 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| X-User-ID | eJwNwgkRACAIBMBKvIfEEYX+EXR2XcE4YXCYz9eSfQRXF7hcd5y71DNC+lKyyBhXEHVFf3vN5rYGoTJpHkTmFUI= |
| Cancel-Lock | sha1:73QN2h/5kV56FyxJl+lhDQsnXZs= |
| X-NNTP-Posting-Host | eJwNyMkBwDAIA7CVOF0zTihh/xFaPZUOxfsEEpGbWyL2D9s4FTdyTNhC6KLksAdjdbmuvsftA/y1EEg= |
| Xref | csiph.com comp.lang.javascript:27329 |
Show key headers only | View raw
Joao Rodrigues wrote: > On 04/11/2015 06:42 PM, Thomas 'PointedEars' Lahn wrote: >> Joao Rodrigues wrote: >>> On 04/11/2015 11:15 AM, Thomas 'PointedEars' Lahn wrote: >>>> or in my case I have written >>>> >>>> if (typeof jsx.net == "undefined") >>> […] >>> >>>> BTW, The “!==” instead of “!=” adds no efficiency here as both operands >>>> are of the same type, String; however, it may quiet code linters such >>>> as JSHint. >>> >>> JSLInt sees an error here: "Unexpected 'typeof'. Use '===' to compare >>> directly with undefined." >> >> Read again. > > ? I was talking about the “!==” vs. “!=” with regard to tools like JS*H*int, which would recommend the former in order to avoid implicit type conversion if not configured otherwise. You are talking about the wrong recommendation of if (jsx.net === undefined) of JS*L*int. It is wrong because the “undefined” property of the global object has been writable before, but Douglas Crockford is either unaware of that or chooses to ignore it, like so many other issues. Avoid JSLint. -- 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
Puzzling JS Error "Mel Smith" <syntel@cox.net> - 2015-04-09 11:49 -0600
Re: Puzzling JS Error "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-04-09 22:21 +0200
Re: Puzzling JS Error "Mel Smith" <syntel@cox.net> - 2015-04-09 16:26 -0600
Re: Puzzling JS Error "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-04-10 10:32 +0200
Re: Puzzling JS Error Denis McMahon <denismfmcmahon@gmail.com> - 2015-04-10 14:51 +0000
Re: Puzzling JS Error "Mel Smith" <syntel@cox.net> - 2015-04-10 09:48 -0600
Re: Puzzling JS Error "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-04-10 18:01 +0200
Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-10 00:20 +0200
Re: Puzzling JS Error JJ <jj4public@vfemail.net> - 2015-04-10 11:15 +0700
Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-11 16:15 +0200
Re: Puzzling JS Error Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-04-11 18:09 -0300
Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-11 23:42 +0200
Re: Puzzling JS Error Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-04-11 19:27 -0300
Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-12 01:01 +0200
Re: Puzzling JS Error Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-04-12 01:07 +0200
Re: Puzzling JS Error Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-04-11 22:07 -0300
csiph-web