Posted By

grasshoper on 05/27/12


Tagged

javascript colon


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

hurcy
o0110o


javascript colon notation :


 / Published in: JavaScript
 

Both are functionally equivalent

  1. var o = {
  2. r: 'some value',
  3. t: 'some other value'
  4. };
  5.  
  6. var o = new Object();
  7. o.r = 'some value';
  8. o.t = 'some other value';

Report this snippet  

You need to login to post a comment.