+ 2
Hey guys, could you just find an error in my code written in add() function...
I'm just perplexed to correct the addition operation. Does anyone help me out plz.... https://code.sololearn.com/W1vR82iTUkH5/?ref=app
1 Réponse
+ 2
var z = parseInt(x) + parseInt(y);
Because prompt() returns string, so you need to type cast x and y into integer or float to prevent + from being overloaded to string concantention.