1var str = "Hello world That is reallly neat!";
2var res = str.substring(0, 5);//get first 5 chars
1// the substring method returns a string out of another string
2
3const str = 'Mozilla';
4
5console.log(str.substring(1, 3));
6// expected output: "oz"
7
8console.log(str.substring(2));
9// expected output: "zilla"
10
1// zero-based index, 'end' is excluded from result
2myString.substring( start, end )