This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HFSJ page 380

 
Vivek Gupta
Greenhorn
Posts: 23
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ page 380
Code magnets exercise:
What can be the different EL expressions which can be put to print the same result?

Leelu's dog Clyde's toys are: stick, neighbour's cat, and a Barbie doll head
My try-
${person["name"]}'s dog ${person["dog"].name}'s toys are: ${person["dog"].toys[0].name},${person["dog"].toys[1].name}, and a ${person["dog"].toys[2].name}

Can it be written by without using the dot (.) operator and "only using" the [] operator.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic