How to add two strings as if they were numbers? [duplicate]

I would use the unary plus operator to convert them to numbers first.

+num1 + +num2;

Leave a Comment