I need to get an array of all element ID's of elements of a given class (e.g. "main-menu-item"). This is what I have so far:
Array.prototype.map.call(document.querySelectorAll(".main-menu-item"), (elem => elem.id));
Is there a cleaner and/or more concise way to do this?