Getting Javascript to run

I’m very new to Atom and coding. I’ve been able to get HTML and CSS to show in the HTML package, but don’t know how to make the javascript file work, as well. I’m doing some tutorials, so the javascript is all written out for me, so there shouldn’t be any errors in my coding. However, it doesn’t show up in the html preview package, and it isn’t showing up when I load my page onto my browser.

Any ideas how I can get my HTML, CSS, AND Javascript to all be friends and work together so I can see that I’m coding correctly? HTML and CSS are not a problem, they are working beautifully, but Javascript doesn’t seem to want to play.

1 Like

As far as how to execute code that you’ve written in Atom, you should refer to the FAQ:

Even though Atom is built on HTML, CSS and JavaScript, learning JavaScript from the ground up is a bit off-topic for this forum. I’ve generally found the site to be a great resource. They have a JavaScript tutorial that starts here:

I hope that helps!

Thanks for the information. I’m not looking for Atom to teach me coding, but to use it to practice, but I don’t see a way to link Javascript to HTML and CSS, which has a preview I can use. I’m working through Codecademy’s training and I was trying to work through a book, but will need to find some way to put in the code and view it for the exercises in the book. I’ll look at your reply more closely and decipher its computerese, so that I can understand it. I’m very new to all this, but am really, really enjoying it and hoping to move into it for a career as soon as I can get a handle on it all. It’s quite an adventure and I appreciate any help offered, so thanks.


Then you should probably try out jsfiddle. It’s a great place to run small amounts of web code.

Thanks I’ll check into it.

I’m also new both to Atom and coding. I’ve got the following packages which seem to allow me to run JS: script, browser-plus, and navigate (-- but I can’t link to it because I’m a newly registered user). I’m not sure if they’re redundant or not, but they seem to do the trick for me.

Try downloading JavaScript Packages, if you are using linux, then try to run it on the terminal.