Home > Back-end >  How can I let the Debug Console print something 5 times instead of 1 time in Javascript, Visual Stud
How can I let the Debug Console print something 5 times instead of 1 time in Javascript, Visual Stud

Time:02-11

I am new to JavaScript. Is there a way to see the Hello 5 times instead see it showing that it was printed 5 times?

enter image description here

CodePudding user response:

Disable the setting:

Debug > Console: Collapse Identical Lines

Controls if the debug console should collapse identical lines and show a number of occurrences with a badge.

CodePudding user response:

Just put a counter with the console logs to see hello 5 times. Like

const a = [1, 2, 3, 4, 5];
a.forEach((num) => console.log(num, "hello"))

  • Related