The No.1 i-Technology Magazine in the World !
   
 

      ES no BS
This is a personal blog of Yakov Fain       My son's animations and music         No BS IT podcast      Америчка




Archives

««Aug 2010»»
SMTWTFS
1234567
891011121314
15161718192021
22232425262728
293031

RSS Feed








Subscribe to these blogs

A Coding challenge

posted Monday, 9 October 2006

Just finished writing an article  called "Polymorphism Without Interfaces".  I challenge you to review  and explain the code below (it's written in ActionScript 3.0) :

for(var i:uint = 0; i < workers.length; i++) {

 var p:* = workers[i]["increasePay"];

 output.text+=p==undefined?"no luck":p(5);     

}

The person who writes  the best explanation, will get a free copy of  my e-book "Java programming for kids, parents and grandparents ". I'm sure plenty of people understand the syntax, so I'm looking for an explanation of WHY it's written this way.

tags:            

links: digg this    del.icio.us    technorati