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


Groups > comp.lang.javascript > #8220

Re: Fun with Arrays: What Have I Done?

From Dr J R Stockton <reply1145@merlyn.demon.co.uk>
Newsgroups comp.lang.javascript
Subject Re: Fun with Arrays: What Have I Done?
Date 2011-11-10 20:01 +0000
Organization Home
Message-ID <KBS9ZeFM2CvOFwb4@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <d40kb79urtc6ekdiubqajt8piarusksvro@4ax.com> <cbd20c37-234b-4bf5-acfc-658d3e5d4811@q39g2000prg.googlegroups.com>

Show all headers | View raw


In comp.lang.javascript message <cbd20c37-234b-4bf5-acfc-658d3e5d4811@q3
9g2000prg.googlegroups.com>, Tue, 8 Nov 2011 21:30:00, RobG
<rgqld@iinet.net.au> posted:

>On Nov 9, 2:32 pm, Gene Wirchenko <ge...@ocis.net> 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  <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms
 PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm
 Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.

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


Thread

Fun with Arrays: What Have I Done? Gene Wirchenko <genew@ocis.net> - 2011-11-08 20:32 -0800
  Re: Fun with Arrays: What Have I Done? RobG <rgqld@iinet.net.au> - 2011-11-08 21:30 -0800
    Re: Fun with Arrays: What Have I Done? RobG <rgqld@iinet.net.au> - 2011-11-08 21:44 -0800
    Re: Fun with Arrays: What Have I Done? Dr J R Stockton <reply1145@merlyn.demon.co.uk> - 2011-11-10 20:01 +0000
  Re: Fun with Arrays: What Have I Done? Tim Streater <timstreater@greenbee.net> - 2011-11-09 10:57 +0000
    Re: Fun with Arrays: What Have I Done? SteveYoungTbird <stephen.young@chello.at> - 2011-11-09 12:17 +0100
    Re: Fun with Arrays: What Have I Done? Elegie <elegie@anonymous.invalid> - 2011-11-09 12:24 +0100
      Re: Fun with Arrays: What Have I Done? Tim Streater <timstreater@greenbee.net> - 2011-11-09 13:31 +0000
    Re: Fun with Arrays: What Have I Done? Gene Wirchenko <genew@ocis.net> - 2011-11-09 10:32 -0800

csiph-web