javascript colon notation :


/ Published in: JavaScript
Save to your folder(s)

Both are functionally equivalent


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.