Write a function named everyNPositions
that receives 2 parameters:
message
step
and returns a new string composed of all characters from message
that are on positions divisible by step
.
message
=step
=Our message has 32 characters. The characters on positions 0, 6, 12, 18, 24 and 30 make up the result Wfoo e
.