n
by:
n
is 1
then the sequence endsn
is even
then the next n
of the sequence = n/2
n
is odd
then the next n
of the sequence = (3 * n) + 1
27, 82, 41, 124
and ending with 8, 4, 2, 1
hailstoneSequence
should be a function.
testString: assert(typeof hailstoneSequence === 'function');
- text: hailstoneSequence()
should return [[27,82,41,124,8,4,2,1], [351, 77031]]
testString: assert.deepEqual(hailstoneSequence(), res);
```