The +=operator, like the + operator, does concatenation rather than addition when its operands are not numbers.Object is a function, so += converts it to a string somehow and concatenates a 1 to its butt.We can avoid problems like this the same way we avoid problems with for in: by testing for membershipwith the hasOwnProperty method or by looking for specific types.