Sum String

Write a function that takes as input a string that only contains numbers. Your function should take each individual character in the string and sum them together e.g. '1234' returns '10'

Bonus

Allow the string to include negative values e.g. '12-23' returns '4'

results matching ""

    No results matching ""