Javascript Select Letter in string

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