My code looks like this:
Link 1 <
Same code as provided by Grimace but in ES6
const allLinks = $('#ulList a').map((i,el) => $(el).attr('href')).get(); const allIds = $('#ulList li').map((i,el) => $(el).attr('id')).get();