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

13 lines
434 B
Markdown
Raw Normal View History

2018-10-12 19:37:13 +00:00
---
title: Use Bracket Notation to Find the First Character in a String
---
## Use Bracket Notation to Find the First Character in a String
<!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
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"