jquery get .timeslot-time where data-id is eqaul to "10" in javascript

index.tsx
var timeSlot = $('.timeslot-time[data-id="10"]').text();
console.log(timeSlot);
80 chars
3 lines

The code above uses the jQuery selector $('.timeslot-time[data-id="10"]') to select the element with class .timeslot-time and data-id attribute equal to 10. Then, the text() function is used to retrieve the text content of that element, which is assigned to the timeSlot variable, and finally logged to the console using console.log().

gistlibby LogSnag