mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-25 02:14:11 -05:00
fix(curriculum): update example of toLowerCase method (#53495)
This commit is contained in:
@@ -7,9 +7,16 @@ dashedName: step-79
|
||||
|
||||
# --description--
|
||||
|
||||
Your `output.innerHTML` string will need a `span` element. Create that, and give it a `class` attribute set to the `surplusOrDeficit` variable, but lowercased.
|
||||
When you need to lower case a string, you can use the <dfn>toLowerCase()</dfn> method. This method returns the calling string value converted to lower case.
|
||||
|
||||
Strings have a `.toLowerCase()` method that can help you with this. Do not give your `span` any text yet.
|
||||
```js
|
||||
const firstName = 'JESSICA';
|
||||
console.log(firstName.toLowerCase()); // Output: jessica
|
||||
```
|
||||
|
||||
Your `output.innerHTML` string will need a `span` element. Create that, and give it a `class` attribute set to the `surplusOrDeficit` variable. Your `surplusOrDeficit` variable should be converted to lower case using the `toLowerCase()` method.
|
||||
|
||||
Do not give your `span` any text yet.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
Reference in New Issue
Block a user