Ask coding questions

← Back to all posts
Console.log not working?
saatvikrk (0)

I am trying a basic print function, however Console.log isn't working, neither is alert.

Commentshotnewtop
vedprad1 (693)

First of all, console.log() should be all lowercase.

As for alert(), that will not work in node.js because node.js is server side. alert() is a function that is used only in client side, when HTML and CSS are involved. If you want to use alert(), you have to go to an HTML, CSS, JS repl.

If this answers your question, please check the checkmark on the left side of this message. Thanks and Good Luck!

Zavexeon (249)

Console should be lowercase, like console.log();.