fix: add a test + reword to remove seed comments
This commit is contained in:
@ -14,10 +14,16 @@ There are many methods to use with `console` to output messages. `log`, `warn`,
|
||||
|
||||
# --instructions--
|
||||
|
||||
First, use `console.log` to log the `output` variable. Then, use `console.clear` to clear the browser console. View the difference in the two consoles.
|
||||
First, open your browser console so you can see the logs. To do that, you can right-click the freeCodeCamp navigation bar at the top and click `inspect` on most browsers. Then find the `console` tab in the window that opens. After that, use `console.log` to log the `output` variable. View the two consoles to see the log. Finally, use `console.clear` after your log to clear the browser console. View the difference in the two consoles.
|
||||
|
||||
# --hints--
|
||||
|
||||
You should use `console.log()` to print the `output` variable.
|
||||
|
||||
```js
|
||||
assert(__helpers.removeWhiteSpace(code).match(/console\.log\(output\)/));
|
||||
```
|
||||
|
||||
You should use `console.clear()` to clear the browser console.
|
||||
|
||||
```js
|
||||
@ -28,10 +34,14 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
You should use `console.log()` to print the `output` variable.
|
||||
You should clear the console after your log.
|
||||
|
||||
```js
|
||||
assert(__helpers.removeWhiteSpace(code).match(/console\.log\(output\)/));
|
||||
assert(
|
||||
__helpers
|
||||
.removeWhiteSpace(code)
|
||||
.match(/console\.log\(output\)[\s\S]*console.clear\(\)/)
|
||||
);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
@ -39,27 +49,15 @@ assert(__helpers.removeWhiteSpace(code).match(/console\.log\(output\)/));
|
||||
## --seed-contents--
|
||||
|
||||
```js
|
||||
// Open your browser console.
|
||||
let output = "Get this to show once in the freeCodeCamp console and not at all in the browser console";
|
||||
|
||||
// Use console.log() to print the output variable
|
||||
|
||||
// View the freeCodeCamp console and the browser console
|
||||
|
||||
// Now, add console.clear() after your console.log() to clear the browser console
|
||||
```
|
||||
|
||||
# --solutions--
|
||||
|
||||
```js
|
||||
// Open your browser console
|
||||
let output = "Get this to show once in the freeCodeCamp console and not at all in the browser console";
|
||||
|
||||
// Use console.log() to print the output variable
|
||||
console.log(output);
|
||||
|
||||
// View the freeCodeCamp console and the browser console
|
||||
|
||||
// Now, add console.clear() after your console.log() to clear the browser console
|
||||
console.clear();
|
||||
```
|
||||
|
Reference in New Issue
Block a user