I’ve been trying his problem for a quite long time now. I’m getting “invalid regexp group”. Can anyone give me a hint? Should this be happening?
// 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();
// Use console.log() to print the outputOne variable
console.log(outputOne);
I can’t reproduce that error. Are you by any chance using Edge or Safari?
Bugs should always be reported as GitHub Issues. Whenever reporting a bug, please check first that there isn’t already an issue for it and provide as much detail as possible.
What is the reason for “printing it out twice”?!
and why do you have to define an argument for console log, but not for console clear?! and how are you supposed to know that console clear doesn’t need an argument? Another terribly explained exercise…
Mine got hung up on having the comment on the same line as the semicolon.
// Open your browser console
let outputTwo = "This will print to the browser console 2 times";
console.log(outputTwo);// to print the outputTwo variable
let outputOne = "Try to get this to log only once to the browser console";
console.clear(); // Use the next line to print the outputOne only once
// Use console.log() to print the outputOne variable
console.log(outputOne);