JSFiddle - React, Tailwind, and code Playground

HTML

<div id="a"></div>
<div id="b"></div>
<div id="c"></div>

JavaScript

var ids = $('div').map(function() {
    return this.id;
}).get();
alert(ids);