I know that for an array it can be used last function of underscore, so in the case of this array it would be:
myArray = [32, 1, 8, 31];
lastElement = _.last(myArray);
The problem is when there is a matrix like this:
myArray = [[1, 3, 5], [55, 66, 77], [0, 1, 2]];
and the wanted result is
lastElement = [5, 77, 2];
Any suggestions?
_.last(_.zip(...myArray))