Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@kevinye32 I think it's 1.
+ casts the number to string, - casts the string to number. So you have
"2" - 1
which evaluates to 1.
Great pic! 8) -
@FunkDelegate well it is 10, two strings concatenated into '11' first. Having too much fun with these type issues, someone is gona rant about us not using typescript after this.
Me: why do people hate javascript?
Also Me after 5 mins of js coding :
Oh right now i remember why
rant