DEV Community

Discussion on: What is the oddest JavaScript behavior?

Collapse
 
kenbellows profile image
Ken Bellows

Imo the implicit type conversion is a little weird, but even ignoring that, I think the point was the difference in behavior between '11' + 1, which converts the number to a string, and '11' - 1, which converts the string to a number. This discrepancy makes implicit type casting feel unpredictable and weird, at noon least to me