We given a task to create a swift function to generate and return an array of an odd number for a given number of element.
If element is 7 then output will be [1,3,5,7,9]