2018-10-12 15:37:13 -04:00
|
|
|
---
|
|
|
|
title: Use Bracket Notation to Find the First Character in a String
|
|
|
|
---
|
2019-07-24 00:59:27 -07:00
|
|
|
# Use Bracket Notation to Find the First Character in a String
|
2018-10-12 15:37:13 -04:00
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
|
|
|
|
---
|
|
|
|
## Hints
|
|
|
|
|
|
|
|
### Hint 1
|
2018-10-12 15:37:13 -04:00
|
|
|
Remember that the first character of a string is at the zero-th position. For example:
|
|
|
|
|
2019-07-24 00:59:27 -07:00
|
|
|
```javascript
|
|
|
|
var str = "Hello";
|
|
|
|
var letter = str[0]; // This equals "H"
|
|
|
|
```
|