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


Groups > comp.lang.javascript > #29669

Re: (Sort of) newbie trying to understand "array.length"

Newsgroups comp.lang.javascript
Subject Re: (Sort of) newbie trying to understand "array.length"
From "Evertjan." <exxjxw.hannivoort@inter.nl.net>
References <b99c7479-d78d-4e99-b6e7-c3e6d2010e6c@googlegroups.com> <array-20160221194511@ram.dialup.fu-berlin.de> <dot-notation-20160222025430@ram.dialup.fu-berlin.de> <Perl-6-20160223043600@ram.dialup.fu-berlin.de>
Date 2016-02-23 11:20 +0100
Message-ID <XnsA5B7735A697E0eejj99@194.109.6.166> (permalink)

Show all headers | View raw


ram@zedat.fu-berlin.de (Stefan Ram) wrote on 23 Feb 2016 in 
comp.lang.javascript:

>   BTW: In Perl 6, one can write either
> "abc".chars
>   or
> chars( "abc" )
>   as well, to get the number of chars of the string.

Javascript has next to:

alert( 'abc'.length ); // 3

also:

alert( 'abc'['length'] ); // 3

So also:

var st = 'def';
var le = 'length';
alert( st[le] ); // 3


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

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


Thread

(Sort of) newbie trying to understand "array.length" bit-naughty@hotmail.com - 2016-02-21 09:51 -0800
  Re: (Sort of) newbie trying to understand "array.length" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-21 23:48 +0100
    Re: (Sort of) newbie trying to understand "array.length" Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-25 06:24 -0800
  Re: (Sort of) newbie trying to understand "array.length" John Harris <niam@jghnorth.org.uk.invalid> - 2016-02-22 11:03 +0000
  Re: (Sort of) newbie trying to understand "array.length" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-22 12:23 +0000
  Re: (Sort of) newbie trying to understand "array.length" Aleksandro <aleksandro@gmx.com> - 2016-02-22 11:57 -0300
    Re: (Sort of) newbie trying to understand "array.length" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-22 21:19 +0100
      Re: (Sort of) newbie trying to understand "array.length" "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-02-23 11:22 +0100
        Re: (Sort of) newbie trying to understand "array.length" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-02-23 20:50 +0100
  Re: (Sort of) newbie trying to understand "array.length" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-02-23 11:20 +0100

csiph-web