JSFiddle - React, Tailwind, and code Playground

HTML

<span>
 <b>hi_1</b>
 <b>hi_2</b>
 <b>hi_3</b>
 <b>hi_4</b>
<span>

JavaScript

$(document).ready(function() {
   $('span b').each(function() {
  console.log($(this).text());
}); 
});