Got 3. and 5. wrong, haha.
I supposed that the first operand would decide which implementation of + would be used, but I guess the rule is: string wins :D
Both convert the number to string and do a string concatination, even in one the number is the first operand and in the other the string is the first operand.
Ah, yes.
I was talking about 3 and 5 :D
Oh i thought it was 5 and 6. yeah 3 and 5 are Strings😁
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Got 3. and 5. wrong, haha.
I supposed that the first operand would decide which implementation of + would be used, but I guess the rule is: string wins :D
Both convert the number to string and do a string concatination, even in one the number is the first operand and in the other the string is the first operand.
Ah, yes.
I was talking about 3 and 5 :D
Oh i thought it was 5 and 6.
yeah 3 and 5 are Strings😁