Skip to content

DigitSum

Returns the sum of digits of a number.

$ wo 'DigitSum[0]'
0

It threads over a list.

$ wo 'DigitSum[{12, 123}]'
{3, 6}