📜  使用 javascript 代码示例截断字符串

📅  最后修改于: 2022-03-11 15:01:15.991000             🧑  作者: Mango

代码示例3
var length = 3;
var myString = "ABCDEFG";
var myTruncatedString = myString.substring(0,length);
// The value of myTruncatedString is "ABC"