Ask coding questions

← Back to all posts
console clear for JS?
Nanowrimoijk (31)

Can we get a console clear command for JavaScript? It would be really nice especially since I am making a text-based game engine and i would like it to not fill the console.

Answered by Vandesm14 (497) [earned 5 cycles]
View Answer
Commentshotnewtop
vedprad1 (694)

Try console.clear();

Nanowrimoijk (31)

@vedprad1 nope does not work, thats why I made this post

Klokat (41)

@Nanowrimoijk Could you give us more info? Is this on the browser? Are you using nodejs? What is the expected behavior? And what do you get instead?

vedprad1 (694)

@Nanowrimoijk : Could you provide the link to your repl? Thanks!

Nanowrimoijk (31)

@vedprad1 @Klokat all i was saying was it would be nice to have a console.clear command. thats it

Vandesm14 (497)

@Nanowrimoijk Console.clear should work. If it does not, it might be a problem with your code. Could you provide a link to your repl?

If it's just a suggestion for a command there is no need as the command already exists and is confirmed to work on repl.it

Please mark this as answered if I helped your problem

Vandesm14 (497)

@Nanowrimoijk I see the problem. Repl.it does not support a ton of console features in the editor, so for this to actually work you'd have to run it here: https://dependentelectronicboolean.nanowrimoijk.repl.run/ (you can also get there via the repl.run link which is right on top of the console view.