Skip to content

I Learnt Today

a journal of a journey

  • Home
  • Blog
  • About
  • Contact

Tag Archives: javascript inline objects

Javascript define objects with sub objects in single line

var tmp = {sub:{title:’titlex’, alt:’altx’}, viewName:’xxx’};   “sub” is the sub object that has properties, title and alt. ViewName is a property of the parent class.

Posted byMenolOctober 21, 2013Posted inWeb DevelopmentTags:Javascript, javascript inline objects, javascript object definitionLeave a comment on Javascript define objects with sub objects in single line
I Learnt Today, Blog at WordPress.com.