📅  最后修改于: 2022-03-11 15:04:32.045000             🧑  作者: Mango
/*An expression of the form someString[i] gives the character at index i.
This program prints out the initials of the person's name.*/
let jsCreator = "Brendan Eich";
let firstInitial = jsCreator[0];
let lastInitial = jsCreator[8];
let outputStr = "JavaScript was created by somebody with initials " +
firstInitial + "." +
lastInitial + ".";
console.log(outputStr);