mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-09-24 23:01:18 +08:00
fix(curriculum): typo in Data Types and Conditionals Lesson (#60669)
This commit is contained in:
+6
-6
@@ -6,7 +6,7 @@ dashedName: learn-data-types-and-conditionals-lesson-d
|
||||
---
|
||||
# --description--
|
||||
|
||||
Seeing the example below You want to know the index of the last occurence of the word `The` in the string.
|
||||
Seeing the example below You want to know the index of the last occurrence of the word `The` in the string.
|
||||
|
||||
```javascript
|
||||
let sentence = "freeCodeCamp loves The Odin Project! The Odin Project is great!";
|
||||
@@ -18,23 +18,23 @@ let sentence = "freeCodeCamp loves The Odin Project! The Odin Project is great!"
|
||||
|
||||
## --text--
|
||||
|
||||
Which method should be used to find the index of the last occurence of the word `The` in the string?
|
||||
Which method should be used to find the index of the last occurrence of the word `The` in the string?
|
||||
|
||||
## --answers--
|
||||
|
||||
The `includes()` method should be used to find the index of the last occurence of the word `The` in the string.
|
||||
The `includes()` method should be used to find the index of the last occurrence of the word `The` in the string.
|
||||
|
||||
---
|
||||
|
||||
The `lastIndexOf()` method should be used to find the index of the last occurence of the word `The` in the string.
|
||||
The `lastIndexOf()` method should be used to find the index of the last occurrence of the word `The` in the string.
|
||||
|
||||
---
|
||||
|
||||
The `indexOf()` method should be used to find the index of the last occurence of the word `The` in the string.
|
||||
The `indexOf()` method should be used to find the index of the last occurrence of the word `The` in the string.
|
||||
|
||||
---
|
||||
|
||||
The `search()` method should be used to find the index of the last occurence of the word `The` in the string.
|
||||
The `search()` method should be used to find the index of the last occurrence of the word `The` in the string.
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user