Get every nth element of array

Write a function that takes an array (a) and a value (n) as arguments. Save every nth element in a new array. Return the new array
Get a premium membership to access this content: