Not working as expected [Stackoverflow]

Hi, would you mind answering a question on stackoverflow? Would be really helpful!