var a = {};
a + 1 // return "[object Object]1"
I know why this happened. Object toPrimitive happened and after a.toString return [object Object] and merge with number But why when I type code like this
{} + 1 // return 1
Object not converted string?
Also why object toPrimitive hint Number return 0 When object convert to number this is look valueOf function and why valueOf return 0?