Expr syntax?, with { blah : foo }

Discussion in 'Javascript' started by invinfo@rcn.com, Dec 1, 2005.

  1. Guest

    I recently saw this type of expression, and not having seen it before,
    does it imply somekind of an associative array or what ???

    Is there documentation on this ? where ?
    My normal JS resource sites would be
    netscape
    irt.org
    drclue.net
    javascript.internet.com
    javascript.com
    faqts.com KB JS category
    Others Reference Links, gladly welcomed.

    the expression actually had multiple entries

    { blah : foo,
    achew : gazoontite }
    , Dec 1, 2005
    #1
    1. Advertising

  2. web.dev Guest

    wrote:
    > I recently saw this type of expression, and not having seen it before,
    > does it imply somekind of an associative array or what ???
    >
    > Is there documentation on this ? where ?
    > My normal JS resource sites would be
    > netscape
    > irt.org
    > drclue.net
    > javascript.internet.com
    > javascript.com
    > faqts.com KB JS category
    > Others Reference Links, gladly welcomed.
    >
    > the expression actually had multiple entries
    >
    > { blah : foo,
    > achew : gazoontite }


    The above expression is the syntax for creating an object literal which
    is defined in ECMAScript v3. It allows you to create an object and
    specify its properties. It consists of a comma-separated list of
    colon-separated property/value pairs. So in your above expression, you
    have an object with properties "blah" and "achew" whose corresponding
    value is whatever the value of "foo" and "gazoontite" is at the time.
    web.dev, Dec 2, 2005
    #2
    1. Advertising

  3. wrote:

    [snip]
    > Is there documentation on this ? where ?


    Google on "JSON". (Javascript Object Notation).

    Also see also 11.1.5 of the ECMA specification:-

    <URL:http://www.ecma-international.org/publications/standards/Ecma-262.htm>

    Regards

    Julian Turner
    Julian Turner, Dec 2, 2005
    #3
  4. RobG Guest

    RobG, Dec 2, 2005
    #4
  5. wrote:

    > [...]
    > My normal JS resource sites would be
    > netscape


    Netscape DevEdge <URL:http://devedge.netscape.com/> is long gone.
    Find some of it at <URL:http://mozilla.org/js>,
    <URL:http://devedge-temp.mozilla.org/index_en.html> (temporary!)
    and <URL:http://developer.mozilla.org/>, or use Web archives like
    <URL:http://web.archive.org/>.

    > irt.org
    > drclue.net
    > javascript.internet.com
    > javascript.com
    > [...]


    I do not know about the rest that is cited here, but drclue.net
    is definitely not to be recommended as JS resource, or any other
    technique used on the Web for that matter.


    PointedEars
    Thomas 'PointedEars' Lahn, Dec 2, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. evolve
    Replies:
    2
    Views:
    490
    William Ryan
    Nov 2, 2003
  2. A. Kong
    Replies:
    2
    Views:
    4,708
    Iwo Mergler
    Oct 11, 2004
  3. Hylander
    Replies:
    0
    Views:
    403
    Hylander
    Jan 16, 2004
  4. yaru22
    Replies:
    25
    Views:
    690
    Daniel Dyer
    Jan 8, 2007
  5. Good Night Moon
    Replies:
    9
    Views:
    280
    Rick DeNatale
    Jul 25, 2007
Loading...

Share This Page