Why does this code display 31 instead of 4 in the console?

Because "3" and "1" are string valuesBecause the expression subtracts the numbers

Because "3" and "1" are string values.