(Archived) Codewars 8 kyu Sum the Strings JavaScript

preview_player
Показать описание

here we're gonna use the string object to do something

Рекомендации по теме
Комментарии
Автор

Here's a way to do it with the .toString() method below:

function sumStr(a, b) {
return ((parseInt(a) || 0) + (parseInt(b) || 0)).toString();
}

marangelyrosas