Kokodoko
Kokodoko

Reputation: 28128

Javascript Console Clear disables all console logs instead of clearing

My main.js file is loaded within index.html, and starts with

console.clear();

So I get a clean console before the project starts. Strangely, any logs that follow console.clear aren't shown anymore either!

console.clear();
console.log("starting the project");
console.log("but these logs are not shown...");

How can I clear the console and then start logging messages?

Upvotes: 0

Views: 657

Answers (2)

Max
Max

Reputation: 348

Code:

console.clear();
console.log("This prints normally.");

Output:

This prints normally.

Works for me. Must be a bug in the software you are using.

Upvotes: 0

justtry
justtry

Reputation: 639

Works good for me http://jsfiddle.net/3rd26za5/

console.log("before clear");
console.clear();
console.log("starting the project");
console.log("but these logs are not shown...");

Upvotes: 3

Related Questions