Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
287 views
in Technique[技术] by (71.8m points)

My clear() command not working in Google Chrome JavaScript console

Every time I run the clear() command to clear space in my JavaScript console on Chrome, I run into the following error: VM229:1 Uncaught TypeError: clear is not a function at :1:1 I'm aware that there are other ways to clear the console, but I'm wondering at what I'm doing wrong or if I have a weird setting enabled.

question from:https://stackoverflow.com/questions/65942550/my-clear-command-not-working-in-google-chrome-javascript-console

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Type console.clear() into the console.

The command will fail with an appropriate error if you enabled the option "preserve log".


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...