View on GitHub

Matt's homepage

Bookmark this to keep an eye on new things I am learning.

Debugging

Return Home

Grouped output

Output messages as a group with indentation

// group content auto-indented under group heading
console.group("My Settings");
console.log(mySettings.timeOutValueMS);
console.log(mySettings.isDebug);
console.log(mySettings.uniqueId);
console.groupEnd();

^ back to top ^

Output timer

Time operations

js console.time("step-1"); // start timer console.timeLog("step-1"); // current progress of timer setTimeout(() => { console.log('Timer is complete'); console.timeEnd("step-1"); // stops timer and outputs ellapsed time }, 5000);

^ back to top ^