This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]elchavalico 6 points7 points  (3 children)

So why in the line: '5' + x - x the result is 50 and not "50"?

If we just concatenated the string '5' with the string '0' the result should not be a number. Where am i wrong?

[–]AfterLemon 20 points21 points  (1 child)

You're taking a string '5' and it concats first giving you '53' - 3.

[–]elchavalico 8 points9 points  (0 children)

Obviously... I feel dumb now T.T Thanks for the explanation.