Trane interview question

Given an array that could contain more arrays, write a recursive function to flatten the array.