Skip to content

Latest commit

 

History

History

282-sumEveryOther

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

sumEveryOther

Interview question of the issue #282 of rendezvous with cassidoo.

The Question

Given a number, sum every second digit in that number.

Example:

> sumEveryOther(548915381)
> 26 // 4+9+5+8

> sumEveryOther(10)
> 0

> sumEveryOther(1010.11)
> 1 // 0+0+1

Installing & Running

Just pnpm i to install all dependencies and then pnpm t to run the tests!