📌  相关文章
📜  字符串字符 javascript 代码示例

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

代码示例3
myString = "Hello World!";

console.log(myString.charAt(0)); // outputs "H"
console.log(myString.charAt(5)); // outputs " "
console.log(myString.charAt(8)); // outputs "r"
/* If the specified index is bigger or equal to the length of the string
   the output will be "". */
console.log(myString.charAt(23)); // outputs ""