SyntaxFix
Write A Post
Hire A Developer
Questions
We can do this by using unary plus operator to convert them to numbers first and simply add. see below:-
var a = "4"; var b = "7"; var sum = +a + +b;