Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Expr syntax?, with { blah : foo }

Reply
Thread Tools

Expr syntax?, with { blah : foo }

 
 
invinfo@rcn.com
Guest
Posts: n/a
 
      12-01-2005
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 }

 
Reply With Quote
 
 
 
 
web.dev
Guest
Posts: n/a
 
      12-02-2005

http://www.velocityreviews.com/forums/(E-Mail Removed) 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.

 
Reply With Quote
 
 
 
 
Julian Turner
Guest
Posts: n/a
 
      12-02-2005

(E-Mail Removed) 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

 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      12-02-2005
(E-Mail Removed) wrote:
[...]

> Others Reference Links, gladly welcomed.
>
> the expression actually had multiple entries
>
> { blah : foo,
> achew : gazoontite }


It's called an initializer:

<URL:
http://devedge-temp.mozilla.org/libr...j.html#1008327
>


--
Rob
 
Reply With Quote
 
Thomas 'PointedEars' Lahn
Guest
Posts: n/a
 
      12-02-2005
(E-Mail Removed) 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
assert false report "blah blah blah" severity note; A. Kong VHDL 2 10-11-2004 02:57 PM
Looking for "full lifecycle".....blah blah blah. Hylander Java 0 01-16-2004 11:06 PM
Re: blah blah blah S. O'Brien MCSE 12 11-06-2003 04:13 PM
Re: blah blah blah S. O'Brien MCSD 12 11-06-2003 04:13 PM
c#:only put "using blah.blah.blah" once instead of every page? evolve ASP .Net 2 11-02-2003 04:12 AM



Advertisments