JSFiddle - React, Tailwind, and code Playground

by niks_on

HTML

<h1>У этого текста нужно последнюю букву циклом узнать</h1>

JavaScript

const text = $('h1').text();
const x = text.split('');
const y = x[x.length - 1];
console.log(y);