TypeScript 字符串操作:获取子字符串
Example
var str = "Apples are round, and apples are juicy."; var sliced = str.slice(3, -2); console.log(sliced);
On compiling, it will generate the same code in JavaScript.
Its output is as follows −
les are round, and apples are juic