Surprisingly, I have not found an answer to select column `n` from an array, where `n` is a variable. I found a great code where I can put in a fixed value for `n` as in the following example:

```
var data = [[3.0, 11.0, 101.0, "Submarine"], [4.0, 11.0, 102.0, "Boats"], [5.0, 11.0, 103.0, "duh"], [6.0, 11.0, 104.0, "cars"]]; //example array called data

var newArray = data.map(function(column){ 
return column[3];});

```

Then `Logger.log(newArray)` returns the 3rd column as desired, [Submarine, Boats, duh, cars].

My question is how to turn this into a **function** of the variable column `n`? I've tried:

```
function newArrayFunction(n){  data.map(function(column){ 
return column[n];});

```

But sadly, newArrayFunction(3) for example returns "null".

Any suggestions? Thanks!