console.log()
statements the exact number of times it is called.
The freeCodeCamp console will print your console.log()
statements a short time after the editor detects a change in the script, as well as during testing.
The freeCodeCamp console is cleared before the tests are run and, to avoid spam, only prints the logs during the first test (see the note below for exceptions).
If you would like to see every log for every test, run the tests, and open the browser console. If you prefer to use the browser console, and want it to mimic the freeCodeCamp console, place console.clear()
before any other console
calls, to clear the browser console.
**Note:** `console.log`s inside functions are printed to the freeCodeCamp console whenever those functions are called, this can help debugging functions that are called during testing.
console.log
to log the output
variable. Then, use console.clear
to clear the browser console.
console.clear()
to clear the browser console.
testString: assert(__helpers.removeWhiteSpace(__helpers.removeJSComments(code)).match(/console.clear\(\)/));
- text: You should use console.log()
to print the output
variable.
testString: assert(__helpers.removeWhiteSpace(code).match(/console\.log\(output\)/));
```