+ 1

JS alert not working

https://code.sololearn.com/c4K6oOp7UXWV/?ref=app JS alert and promts now working? Python works fine tho, anyone able to help me out

24th Jul 2022, 9:12 AM
WiseFries
WiseFries - avatar
3 Respostas
+ 6
WiseFries alert will not work in Node JS Use console.log try this: alert('hi') function alert(msg) { console.log(msg) }
24th Jul 2022, 9:31 AM
A͢J
A͢J - avatar
+ 2
alert is part of the browser api. Node.js doesn't run in a browser.
24th Jul 2022, 9:32 AM
Alex
Alex - avatar
+ 2
thanks both of u, didnt realize lol
24th Jul 2022, 9:35 AM
WiseFries
WiseFries - avatar