Why the alert function is not running on node js? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why the alert function is not running on node js?

I used the alert function on node js to display the squares of the given numbers. However, I am getting an error message that says "alert is not defined at square". When I implemented the same code on the html file using the script tag, the console didn't show any error messages. I have inserted the two files here. Please explain what's preventing alert() from displaying the expected result? I have gone cray cray now ;-; https://code.sololearn.com/cJQ5EgUzzUms/?ref=app https://code.sololearn.com/W8jcNFz30mX7/?ref=app

1st Dec 2020, 3:24 PM
Shafia Rahman Chowdhury
Shafia Rahman Chowdhury - avatar
1 Answer
+ 2
Ah, I see. Thank you ^-^
1st Dec 2020, 4:33 PM
Shafia Rahman Chowdhury
Shafia Rahman Chowdhury - avatar