Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EL

 
sangeeta kapoor
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HF page 420
Ques 6


Which, inserted in line 18, are valid and evalute to c
A. ${list.2}
B. ${list[2]}
C. ${list.listIndx+1}
D. ${list[listIndx+1]}
E. ${list['listIndx'+1]}
F. ${list[list['listIndx']]}

Ans given in the book are
B, D, F

I didn't understand why F is correct. In the book it is mentioned that anything inside [] is evaluated only if its without quotes. So 'listIndx' shouldn't have been evaluated.
 
shankar valiinaykam
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sangeeta,

Oh!!! U have not seen errata of HFS book...Yes, U r right!! Those single quotes have to be removed.

I was also zapped by many such errors in the book. Then I downloaded the errata from oreilly.com. After having a glimpse, I was happy to see my thoughts correct on those erratic pages. :-)

So, RUN to website and get ur copy of errata. I bet u will be happier!!!

Regards,
Shankar
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic