简单类型 / 字符类型

//In JavaScript there are no char
//type, only string 
let str = "ABC";
let charA = str.charAt(0);
//charA is 'A'
let charB = str.charAt(1);
//charB is 'B'
let charC = str.charAt(2);
//charC is 'C'

let charList = "";
str.split("").forEach(function(c) {
    charList += c + ";";
});
//charList is "A;B;C;"

console.log(`charA is \"${charA}\"`)
console.log(`charB is \"${charB}\"`)
console.log(`charC is \"${charC}\"`)
console.log(`charList is \"${charList}\"`)