freeCodeCamp/guide/english/certifications/javascript-algorithms-and-d.../basic-javascript/use-bracket-notation-to-fin.../index.md

434 B

title
Use Bracket Notation to Find the First Character in a String

Use Bracket Notation to Find the First Character in a String

Remember that the first character of a string is at the zero-th position. For example:

var str = "Hello";
var letter = str[0]; // This equals "H"