Daytrip interview question

What the code do and what will be the output