Complete the code to print an error message using the console.
console.[1]('This is an error message');
The console.error method prints error messages to the console, often in red or highlighted to show it's an error.
Complete the code to display a warning message in the console.
console.[1]('This is a warning!');
The console.warn method shows a warning message, usually with a yellow highlight or icon.
Fix the error in the code to print a stack trace of the current point.
console.[1]();The console.trace method prints a stack trace showing the call path to the current point in the code.
Fill both blanks to group console messages and end the group.
console.[1]('Start Group'); console.log('Inside group'); console.[2]();
groupCollapsed instead of group to startgroupClose which is not a valid methodconsole.group starts a new group of messages, and console.groupEnd ends it, helping organize console output.
Fill all three blanks to count how many times a label is logged and then reset the count.
console.[1]('myLabel'); console.[2]('myLabel'); console.[3]('myLabel');
log instead of countcountResetconsole.count logs how many times it has been called with the same label. console.countReset resets that count.