I’ve edited your post for readability. When you enter a code block into the forum, remember to precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (
</>) will also add backticks around text.
I changed the title of your topic to reflect the correct challenge name and the problem you are having.
To answer you question, since you initialize result as an empty string, when you have the line:
result += min;
the min value gets treated as if it were a string, because result is a string. Why don’t you initialize result as 0 (zero)?