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.
  • Follow Following
    • I Learnt Today
    • Already have a WordPress.com account? Log in now.
    • I Learnt Today
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar