0
What is the output?Why?
let num = "8"+2+3; console.log(typeof num,num);
1 Answer
+ 2
When you add numbers to a string, the numbers get converted to a string as well. That's why the output become 823 instead of 13 and the type of it becomes string. If I couldn't clear your doubt, please ask me again.