Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Dr J R Stockton Newsgroups: comp.lang.javascript Subject: Re: Fun with Arrays: What Have I Done? Date: Thu, 10 Nov 2011 20:01:16 +0000 Organization: Home Lines: 31 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain;charset=us-ascii Injection-Info: mx04.eternal-september.org; posting-host="UwYDIHu13GPq28RciNoAJA"; logging-data="12335"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX199IMYcwGlWYJExEBCKiFcPGGnAMe3ia1E=" User-Agent: Turnpike/6.05-S () Cancel-Lock: sha1:OCCqpRuOd//LZpY864zNVak84fk= Xref: x330-a1.tempe.blueboxinc.net comp.lang.javascript:8220 In comp.lang.javascript message , Tue, 8 Nov 2011 21:30:00, RobG posted: >On Nov 9, 2:32 pm, Gene Wirchenko wrote: >> I do not remember where I got the idea that JavaScript can handle >> arrays with string indexes, but I decided to try it, because it could >> simplify certain code that I am planning. As an experienced programmer (IIRC), you /should/ have got it from reading ECMA 262 version 5.1 section 15.4 paragraph 1, if not before. The standard is not suitable for novice programmers; but an experienced programmer, reading its words once through, should spot quite a few odd things in the language which it might be worth knowing the existence of. Unfortunately, there are many regions of the standard which are comparatively easy to understand. >The length property is always one greater than the largest positive the largest non-negative, I think. >integer index, so the length is now 6. and [].length = 0 -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Website - w. FAQish topics, links, acronyms PAS EXE etc. : - see in 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.