Connect Atom to the Console

Hello,

Could you please help me connecting Atom to the console? I searched but I can’t manage to find somethnig helpful.

Thanks!

1 Like

Hey @carmen1408, hope you are well.

I think this is not possible by default with Atom, you might need to install and configure some plugins and could be complex to do.

What are you trying to achieve? maybe there is another way to do it without Atom, i mean it’s only a code editor.

Carlos Z

1 Like

Hello,

I am trying to connect it to the console so I won’t copy-paste every time I write something in Atom. I saw that Ivan and The Net Ninja on youtube have this.

1 Like

would you show me a video where they do that please? because honestly i do not understand quite well.

Carlos Z

1 Like

https://www.youtube.com/watch?v=xUI5Tsl2JpY here is the net ninja

And Ivan does that in the video Scope - Local and Global Variables from JavaScript programming.

Linking Atom to a Browser Console question - I also found this on the forum, but I don’t get it how I should do it

1 Like

Oook I think I got it now, what ivan and net ninja does is to open the file in a browser.

Is not about connecting Atom with the console browser, you only need to understand the common routine that they use to test immediately the code.

    1. Atom is just for code, this is not a compiler or a visualizer of the code, you only use it to write code properly.
    1. To verify your code, you use a browser, by opening the file your are working with atom, also in a browser.
    1. You edit the code in Atom,while having your browser windows opened, just need to refresh the windows (like you are refreshing a webpage) and changes should be visible.
    1. Remember our lesson of the browser console, you can use the console to check if there is any error in your code, you will rely on this to know why something is not being show in your design.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

Yeah, but if I try to open the page I saved from atom, something like “code.js” I can’t. How do I open the file in a browser?

1 Like

Correct, for that you will need a basic HTML file that contains your JS code.
OR just create an script tag inside the HTML file, but for better practice and coding standards it’s better to import JS files.

You can use a basic html template:

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <title></title>
    <script src="fileName.js"></script>
  </head>
  <body>
    
  </body>
</html>

Then you save that file with .html format, your html and JS file should be in the same folder.
Now you can open your .html file with a browser and check how the Js code behaves.

This is a tool that i use time to time to test quick code together: https://codepen.io/pen/

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

Thank you very much!

Have a nice evening! :grinning:

1 Like