>
>
>var BN = {
foo: function() {
alert("hello world");
},
z: function() {
alert("hello world");
},
>}
>
>I would like to add a member moo to BN whose definition is
>
>var moo = {"a":"A","b","B "};
>
>How do I do it?
The right hand side of your assignment to moo isn't valid Javascript syntax, so
there is no way to add it to BN. What are you really trying to do?
var BN = {
foo: function() {
alert("hello world");
},
z: function() {
alert("hello world");
},
}
>
I would like to add a member moo to BN whose definition is
>
var moo = {"a":"A","b","B "};
On Tue, 11 Sep 2007 at 23:33:31, in comp.lang.javas cript, Thomas
'PointedEars' Lahn wrote:
>RobG wrote:
<snip>
>That last comma is a syntax error.
>
>Strictly adhering to the ECMA-262 Ed. 3 grammar, yes. Considering the
>Conformance section of ECMA-262 (all editions so far), no.
<snip>
The Conformance section is there to permit extra features. It's not
there to permit random typing errors. A certain amount of common sense
is assumed, of browser designers as well as of web designers.
Comment