Joined October 2017
·

bobcruz

Programmer/Analyst at Kaiser-Permanente
·
Oakland, CA
·

Good article!

In the past, I often used "+" to coerce a character string to numeric form. I recently got tripped up by the fact that "+" is overloaded on concatenation in JavaScript, so instead of 1 + 2 = 3, I got 1 + 2 = 12! I think I'll switch to subtracting zero, as it is just as fast, and unambiguous too boot!

Achievements
1 Karma
0 Total ProTip Views