René Nyffenegger's collection of things on the web | |
René Nyffenegger on Oracle - Most wanted - Feedback
- Follow @renenyffenegger
|
Objects in JavaScript | ||
var_name = new Object is the same as
var_name = {}
The following two variable assignements are equivalent as well:
var xyz1 = {}; xyz1.foo = ['hello', 'world']; xyz1.bar=['how','are','you']; var xyz2 = { foo: ['hello', 'world'], bar: ['how', 'are', 'you']}; |