Write a function named everyNPositions that receives 2 parameters:
messagestepand 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.
Unlock all functions
The first 10 functions are free. Get lifetime access to all 100 with a one-time payment — no subscription.
Upgrade to Pro