Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const nestedArray = [[1, 2, 1, 24], [8, 11, 9, 4], [7, 0, 7, 27], [7, 4, 28, 14], [3, 10, 26, 7]];
- const getArrayElementsByRows = array => {
- for (element in array) {
- console.log(`row ${element}\n${array[element].join('\n')}`);
- }
- }
- console.log(getArrayElementsByRows(nestedArray));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement