Quiz array question 6

didn’t get why f() is returning 1 when x is 2.