JavaScript выберите букву в строке

const str = 'Hello';
str.substring(0, 2); // => 'Hel'
Lioruby