Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27843
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!1.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: Identity of values in Javascript |
| Date | Sat, 23 May 2015 09:35:17 +0200 |
| Organization | PointedEars Software (PES) |
| Lines | 55 |
| Message-ID | <3579463.nIugcK88cu@PointedEars.de> (permalink) |
| References | <555f256b$0$12988$c3e8da3$5496439d@news.astraweb.com> <87r3q8h3yf.fsf@bsb.me.uk> <555f7d3b$0$13002$c3e8da3$5496439d@news.astraweb.com> <87d21sgpqy.fsf@bsb.me.uk> <number-20150523034604@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 1432366677 9940 eJwNxskBwCAIBMCWJAuLlsMh/Zdg5jUGCsuVRrWxgfAaPGVO70/jNNK1EVqxG1iXGuQtwb+VDxYxEPo= (23 May 2015 07:37:57 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Sat, 23 May 2015 07:37:57 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| X-User-ID | eJwNysEBwCAIA8CVQBKEcQRl/xHaex/N1XvD6eBwEIHaJ3IE05y7baHvUKVekOdKoEWRHpF9Ty5DqTxa/Wk+TCcVPw== |
| Cancel-Lock | sha1:Y6IWbrdM27pZzbU7ldc7BbOoXQg= |
| X-NNTP-Posting-Host | eJwNyMEBwCAIA8CVIhCo4yDI/iPYex7Vl1eY043DKcTH6IO2zM1aKBXX0ENUtu3LUh/IFfQfDxihEUc= |
| Xref | csiph.com comp.lang.javascript:27843 |
Show key headers only | View raw
Stefan Ram wrote: > Ben Bacarisse <ben.usenet@bsb.me.uk> writes: >> There's no real harm in that and Javascript is a rather vague term >> anyway. Most implementations aim to conform with the ECMAScript >> specification and that uses Number etc when talking about the types. > > Some say that »JavaScript« is the name of the ECMAScript > implementation of Netscape/Mozilla, so: This is not only that “some” say, but something that is true. See the ES Matrix and referenced material, in particular my thesis linked there and material referenced in there, for details. > console.log( window.navigator.appCodeName ); > "Mozilla" That does not prove anything. The value of the “appCodeName” property of the “navigator” object is the part of the “navigator.userAgent” value that precedes the *application* version. You get exactly the same value in Chrome/Chromium even though the ECMAScript implementation in Chrome/Chromium is Google V8 JavaScript. Likewise for other HTML user agent environments. The reason for that is that when Microsoft Internet Explorer was published, Netscape Navigator with its Mozilla codebase was already around, and people would check for that. To increase their browser’s market share, Microsoft used much the same User-Agent string; other vendors did too, so it gradually became useless (although nowadays pertinent pieces have been re-added). Which is also why browser sniffing *instead of* feature detection is a bad idea (but there are edge cases where there is no other way, even for experts). See the ES Matrix (see my sig) for an exclusion algorithm that is capable of inferring the used ECMAScript implementation and version in several cases. > console.log( typeof( 2 )); > "number" “typeof” is an operator; you should not write it as if it were a function call: console.log(typeof 2); > However, the MDN sometimes uses upper-case and sometimes > lower-case spellings for those types. Example? -- 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
Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-22 22:47 +1000
Re: Identity of values in Javascript Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 19:17 +0100
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-23 05:02 +1000
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-23 05:25 +1000
Re: Identity of values in Javascript "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-22 23:51 +0200
Re: Identity of values in Javascript Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-23 00:24 +0100
Re: Identity of values in Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-23 09:35 +0200
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-23 23:04 +1000
Re: Identity of values in Javascript "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-05-23 22:27 +0200
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-25 01:58 +1000
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-25 02:12 +1000
Re: Identity of values in Javascript Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-24 23:33 +0100
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-25 21:47 +1000
Re: Identity of values in Javascript Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-26 00:10 +0100
Re: Identity of values in Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-26 17:34 +0200
Re: Identity of values in Javascript Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-26 17:03 +0100
Re: Identity of values in Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-26 18:31 +0200
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-27 23:40 +1000
Re: Identity of values in Javascript Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-05-27 23:21 -0300
Re: Identity of values in Javascript "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2015-05-27 19:32 -0700
Re: Identity of values in Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-28 22:38 +0200
Re: Identity of values in Javascript Scott Sauyet <scott.sauyet@gmail.com> - 2015-05-26 09:06 -0700
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-27 23:02 +1000
Re: Identity of values in Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-23 00:02 +0200
Re: Identity of values in Javascript Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-23 09:19 +0200
Re: Identity of values in Javascript Steven D'Aprano <steve@pearwood.info> - 2015-05-23 05:20 +1000
csiph-web