Here is my solution for saw sequence
function sawSequence(number) { // best case if (number.length === 0 || number.length === 1) { return 0 } if (number.