Even though, there is nothing wrong with my code. This section doesn’t give me a pass.
// Open your browser console
let outputTwo = "This will print to the browser console 2 times";
// Use console.log() to print the outputTwo variable
console.log(outputTwo);
let outputOne = "Try to get this to log only once to the browser console";
// Use console.clear() in the next line to print the outputOne only once
console.clear(outputOne);
// Use console.log() to print the outputOne variable
console.log(outputOne);
You haven’t gotten the correct code. Check what you are clearing from your console.
Hint:
console.clear() doesn’t take any arguments
Solution
// Open your browser console
let outputTwo = "This will print to the browser console 2 times";
// Use console.log() to print the outputTwo variable
console.log(outputTwo);
let outputOne = "Try to get this to log only once to the browser console";
// Use console.clear() in the next line to print the outputOne only once
console.clear(); //<-- no parameters
// Use console.log() to print the outputOne variable
console.log(outputOne);