J.P. Morgan Interview Question

Find the bug in code