Returns undefined. How ever if i console.log inside the map function that prints right value.
const myfun = (data) => {
data.map((elem) => {
return elem[1]
});
};
let demo = [[1,2,3],[1,2,3]]
console.log(myfun(demo));
// gives undefined
// should give 2 2