I have next code and there is a result I have to get, get all the ids in separate array(it would be better to use array methods for me):
const arr = [{id: 1, name: "John"},{id: 2, name: "Maria"},{id: 3, name: "Sheldon"}];
const arr2 = [{id: 4, name: "John"},{id: 5, name: "Maria"},{id: 6, name: "Sheldon"}];
const arr3 = [{id: 7, name: "John"},{id: 8, name: "Maria"},{id: 9, name: "Sheldon"}]
const result = [1, 2, 3, 4, 5, 6, 7, 8, 9];