Ask coding questions

← Back to all posts
Why can I not run this JS
SuperiorChild

So, I'm trying learning HTML, CSS and JS (you know, the famous ones) and everything worked smoothly up until I added JS into the mix. Whenever I now click run, it doesn't work. Do you know if you can combine JS with the others (because that when I searched the language it came up with all 3 together) or if just the JS command (alert) doesn't work on replit. Please help.

Voters
Swishy234
SuperiorChild
Comments
hotnewtop
QuickV

It works for me, but probably not for you because you have HTML code inside your script.js and styles.css file. Also I recommend writing JavaScript code inside the script.js file, and not in the index.html file :P

sn236

It's working