fix(curriculum): typo in Data Types and Conditionals Lesson (#60669)

This commit is contained in:
Abhinav Mohandas
2025-06-02 16:56:24 +00:00
committed by GitHub
parent 725130ed55
commit 7ff1bd91fb
@@ -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--