14.everyNPositions

Write a function named everyNPositions that receives 2 parameters:

  • a string - message
  • a number - step

and returns a new string composed of all characters from message that are on positions divisible by step.

Example 1

Input

message

=

step

=

Output

Explanation

Our message has 32 characters. The characters on positions 0, 6, 12, 18, 24 and 30 make up the result Wfoo e.