Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #7377
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Jukka K. Korpela" <jkorpela@cs.tut.fi> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Objects comparaison ? |
| Date | Fri, 14 Oct 2011 08:59:21 +0300 |
| Organization | A noiseless patient Spider |
| Lines | 24 |
| Message-ID | <j78j3m$uce$1@dont-email.me> (permalink) |
| References | <1k93ek2.1xghqcy1upjvv5N%unbewusst.sein@fai.invalid> <j77bob$rq6$1@dont-email.me> <1783522.fYvYJRLvp5@PointedEars.de> <1k942ne.113p6qs1e2gd3fN%unbewusst.sein@fai.invalid> <j78g1u$hs6$1@dont-email.me> <1k94a7v.1vbmpjd11e944aN%unbewusst.sein@fai.invalid> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-1; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Fri, 14 Oct 2011 05:59:18 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="ngroV0xYIIv0dzjhyZhv5A"; logging-data="31118"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+24F7CkQ0OR7BAEUp1V1KV" |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20110929 Thunderbird/8.0 |
| In-Reply-To | <1k94a7v.1vbmpjd11e944aN%unbewusst.sein@fai.invalid> |
| X-Antivirus-Status | Clean |
| X-Antivirus | avast! (VPS 111013-2, 14.10.2011), Outbound message |
| Cancel-Lock | sha1:c1VvyMGtocsd+XmN14BDs7gYzfM= |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.javascript:7377 |
Show key headers only | View raw
14.10.2011 08:31, Une Bévue wrote:
> Jukka K. Korpela<jkorpela@cs.tut.fi> wrote:
>
>>> I wanted to test my #include method on array :
>>
>> Which "#include method"?
>
> The one I've added to Array :
> Array.prototype.include=function(s){
> for(var i=0,l=this.length;i<l;i++){if(this[i]===s){return true;}}
> return false;
> }
Tested with the code you posted earlier,
var huit = { 'huit' : 8};
var ary = [ 0, 1, 3, 'trois', huit];
ary.include( huit ) returns true, as expected. So how did you test it
when you got false?
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar
Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-13 20:20 +0200
Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-13 21:47 +0300
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-13 21:21 +0200
Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-13 22:40 +0300
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-13 21:46 +0200
Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-13 13:11 -0700
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-14 01:26 +0200
Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-14 12:41 -0700
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-15 21:37 +0200
Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-15 15:51 -0700
Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-15 21:28 -0700
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-16 11:41 +0200
Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-16 09:05 -0700
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-16 21:59 +0200
Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-17 10:53 +0100
Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-17 07:02 -0700
Re: Objects comparaison ? Andreas Bergmaier <andber93@web.de> - 2011-10-17 16:27 +0200
Re: Objects comparaison ? dhtml <dhtmlkitchen@gmail.com> - 2011-10-17 21:28 -0700
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 11:12 +0200
Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-18 15:23 +0100
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 19:48 +0200
Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-19 17:08 +0100
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-20 23:58 +0200
Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-20 15:46 -0700
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 10:55 +0200
Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-18 15:59 +0100
Re: Objects comparaison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-18 19:33 +0200
Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-18 14:05 -0700
Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-18 16:51 -0700
Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-18 17:21 -0700
Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-19 04:40 -0700
Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 16:41 -0700
Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 17:14 -0700
Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 18:33 -0700
Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-23 11:43 -0700
Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 15:32 -0700
Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 16:54 -0700
Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 17:32 -0700
Re: Objects comparaison ? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-19 18:39 -0700
Re: Objects comparaison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-19 16:32 +0100
Re: Objects comparaison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-19 14:18 -0700
Re: Objects comparaison ? Antony Scriven <adscriven@gmail.com> - 2011-10-19 15:46 -0700
Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-20 16:28 +0100
Re: Objects comparison ? Antony Scriven <adscriven@gmail.com> - 2011-10-20 12:23 -0700
Re: Objects comparison ? Antony Scriven <adscriven@gmail.com> - 2011-10-20 15:04 -0700
Re: Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-21 15:38 +0100
Re: Objects comparison ? Andreas Bergmaier <andber93@web.de> - 2011-10-22 19:40 +0200
Re: Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-23 11:49 +0100
Re: Objects comparison ? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-24 19:00 +0200
Re: Objects comparison ? Scott Sauyet <scott.sauyet@gmail.com> - 2011-10-21 05:29 -0700
Re: Objects comparison ? John G Harris <john@nospam.demon.co.uk> - 2011-10-21 16:30 +0100
Re: Objects comparaison ? Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2011-10-18 18:06 +0300
Re: Objects comparaison ? Jake Jarvis <pig_in_shoes@yahoo.com> - 2011-10-18 17:43 +0200
Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 06:11 +0200
Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-14 08:07 +0300
Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 07:31 +0200
Re: Objects comparaison ? "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2011-10-14 08:59 +0300
Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 08:36 +0200
Re: Objects comparaison ? unbewusst.sein@fai.invalid (Une Bévue) - 2011-10-14 08:35 +0200
csiph-web