Hint # 3, basic code solution, and intermediate code solution employ a substr()
function.
However, MDN advises against:
Warning: Although String.prototype.substr(…)
is not strictly deprecated (as in “removed from the Web standards”), it is considered a legacy function and should be avoided when possible. It is not part of the core JavaScript language and may be removed in the future. If at all possible, use the substring()
method instead.
Maybe it should be updated?
Thanks for the heads-up. Feel free to open a bug on freeCodeCamp’s Github about this issue, or if you’re feeling more adventurous, submit a PR to fix the guide article. If you do the latter, do make sure to test your solution first, since String.prototype.substring
does behave differently than String.prototype.substr
.
Thanks! I would love to contribute but last time I tried Github overwhelmed me. Can be pretty daunting for a first timer.
Make sure to read through the following before working on PRs for the Guide articles.
# How to work on Guide articles
With your help, we can create a comprehensive reference tool that will help millions of people who are learning to code for years to come. 💛
You can:
- [Help us by Creating and Editing Guide Articles](#steps-for-creating-and-editing-guide-articles).
- [Help us reviewing pull requests for Guide Articles](#steps-for-reviewing-pull-requests-for-guide-articles)
## Steps for Creating and Editing Guide Articles
1. 🍴 [Fork this repo](https://github.com/freeCodeCamp/freeCodeCamp#fork-destination-box)
2. 👀️ Follow the contributing guidelines outlined below.
3. 🔧 Make some awesome changes!
4. 📖 Read this [style guide for best practices](/docs/style-guide-for-guide-articles.md).
5. 👉 [Make a pull request](https://github.com/freeCodeCamp/freeCodeCamp/compare)
6. 🎉 Get your pull request approved - success!
Or just [create an issue](https://github.com/freeCodeCamp/freeCodeCamp/issues) - any little bit of help counts! 😊
This file has been truncated. show original
# Style guide for creating and editing Guide Articles
We recommend the following guidelines for writing Guide articles to help you get started contributing and to create helpful articles.
## Title
Article titles should be as short, concise, and as to-the-point as possible.
We want campers to quickly find the information they're looking for, and the title should reflect the main theme of the article.
Folder name is used in the URL, so only use dashes (-), numbers (0-9), and lowercase letters (a-z) for it.
However, you can include special characters in the article title.
The titles use a speacial YAML front matter syntax block as shown below. These contain the information required by the build tools to create webpages for the guide articles.
These are the specific front matter requirements:
1. The front matter block should be on the first line of the file.
2. The front matter block should not have whitespaces before and after the lines.
3. The `title` keyword and the string value after the colon (`:`) must only be separted by a single space.
This file has been truncated. show original
Whoa thanks, I’ll give it a shot