javascript array manipulation

>>> a= [1,2,3]
[1, 2, 3]
>>> a[a.length] = 4
4
>>> a
[1, 2, 3, 4]

>>> foo = { foo: "foo" }
Object foo=foo
>>> bar = { bar: "bar" }
Object bar=bar
>>> a = [ foo, bar ]
[Object foo=foo, Object bar=bar]
>>> a.without(foo)
[Object bar=bar]


Leave a Reply

Formatting: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>