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

      ES no BS
       My son's animations and music            training         Twitter            No BS IT podcast

Archives

««Mar 2010»»
SMTWTFS
  123456
78
9
10
11
12
13
14
1516
17
181920
21222324252627
28293031

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