I am writing a simple JavaScript code for the addition of 2 numbers by taking input from the user. The code seems to have no error but instead of adding it’s concatenating the numbers.
I tried changing the keywords from var to let to const but didn’t work. Like when I enter 2 and 3 the expected result is 5 but instead it shows ’23’.
New contributor
Mahek Shaikh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.