Tripadvisor interview question

interpret code segment