Skip to content
Sign upLog in
← Back to Community

Possible to remove things from console.log in javascript?

Profile icon

I'm using an async function for my dice roller and I'm wondering if there's a way to remove the green text from the log so it doesn't split the text.

Cannot infer image mime type

Profile icon
Profile icon

Maybe you could clear the console? There's a clear() function built in but I'm not sure if that works directly from the code.. Try


right after the promise.

I don't think there is a way to "remove" it, but I can tell you that in the actual console it's not green. Only on the Now this is node so the browser can't actually "run" it but for example Visual Studio Code's Terminal, Command Prompt & Even Windows Terminal will not display it in green! :D

Profile icon

I suppose your async function diceR is called directly a top level, so the green text is the returned promise.
Try assign it to a variable, const rollingP = diceR();