Just so there's no confusion, the XML literal in the code snippet below should 
contain no whitespace at all. It seems that when I posted originally in HTML, 
there was a space added on either side of the string "null" by the mail client, 
but they shouldn't be there.

--- On Wed, 8/12/09, Dave Glasser <dglas...@pobox.com> wrote:

From: Dave Glasser <dglas...@pobox.com>
Subject: [flexcoders] *** So you think you know ActionScript? (Read original 
post first) ***
To: flexcoders@yahoogroups.com
Date: Wednesday, August 12, 2009, 8:44 PM






 




    
                  Consider this code snippet:



var xml:XML = <outer><inner> null</inner> </outer>;

var xmlList:XMLList = xml.inner;

trace(xmlList == null);



What does the trace statement output, true or false, and why?



Please provide an answer without running the code (of course) and, better yet, 
without consulting any documentation, or any of the other answers that may have 
been posted already (if you read the list in chronological order.) Pretend it's 
a job interview question and you have to give it your best shot off the top of 
your head.



And also, if you don't mind, don't top-post your answer, so that if someone 
does read your answer before the original post, they might get a chance to 
answer without having seen yours first.




 

      

    
    
        
         
        
        








        


        
        

Reply via email to