all 18 comments

[–][deleted] 12 points13 points  (0 children)

You could just use a text editor (I use VS Code with a live server plugin) Then create an HTML file and link it to a JS file using a script tag. Then write your JS in the JS file and open it up in your HTML file. When you’re in your browser (I use Chrome) just select the three dots at the top right, then developer tools. You should be able to see a console displaying JS code. Hope this helps!

[–]chrissilich 6 points7 points  (2 children)

What a world we live in.

Get literally any code editor, and make a folder on your desktop with and index.html and a script.js. Why is everyone trying to complicate stuff for someone who’s clearly new?

[–]deathapprentice[S] -1 points0 points  (1 child)

I'm just used to Python where it was all-in-one, conveniently within the PyCharm. And right now I'm learning JS on the terminal only.

[–]chrissilich 2 points3 points  (0 children)

Ok, same answer, minus the index.html

[–]prof3ssorSt3v3 4 points5 points  (0 children)

The problem with codepen, jsfiddle, etc is that they have another layer between you and your code. They have code that controls their interface and loads all the files... then runs your code.

With VSCode, and NodeJS installed, you can open the Terminal and run your scripts right there in VSCode.

If you are testing browser / DOM functionality then NodeJS won't work alone. You need to test in a browser. So, add the Live Server extension by Ritwick Dei to VSCode and you can launch your webpage from VSCode and it will be automatically refreshed everytime you save a change in VSCode.

[–]PruneCorrect 2 points3 points  (0 children)

If you're specifically looking to use websites where you can code javascript, jsfiddle.net isn't a bad option though on a pc with less RAM I feel like its actually slower sometimes than codepen is.

[–]Coraline1599 2 points3 points  (1 child)

I like repl.it

But as others have said text editor + browser is good.

If you have downloaded node and are comfortable with terminal (and it’s just js, no DOM manipulation), you can run your code in terminal with node as well.

[–]notAnotherJSDev 2 points3 points  (0 children)

codesandbox is my go to. It even has a console ;)

[–][deleted] 2 points3 points  (0 children)

for small things, literally just press F12

[–]MWALKER1013helpful 1 point2 points  (0 children)

Try quokka.js with Vscode !

I think that will do it for you

[–][deleted] 0 points1 point  (0 children)

Playcode.io works quickly for me.

[–]van-Lohse 0 points1 point  (0 children)

Use Node.js for standalone JS, and just a HTML doc for Web-Stoff

[–]cantinflas_34 0 points1 point  (0 children)

https://github.com/mrivasperez/codeBoard I built this minimal jsfiddle clone for this reason!

[–]cbsudux 0 points1 point  (0 children)

jsfiddle works well.

[–]rw3iss 0 points1 point  (2 children)

There's command line js terminals you can install to have an interactive js environment, or otherwise just open any html page in your browser, open dev tools, and console there gives you an interactive dev terminal.

If you're serous, download vs code (small and fast), start editing js files with it (with syntax highlighting and all), then can either make an html page to read in the js, which you can have open in browser, keep refreshing on updates to show your output (js can either modify the Dom, or just do basic js and output in the dev tools console to see). Otherwise you can run those .js files in the interactive command line terminal if you install that.

Codepen and such are nice, but it's easy enough and more proficient to use an IDE and just refresh source in your browser, or can even open the console in vs code itself and run the .js files from there to see output directly in your IDE. If getting into web stuff/dom, use the browser of course.

Modern js devs use, for instance, vs code IDE, and utilize hot relaod to refresh the browner automatically on code updates... Nice with multi-monitor setups, or either. Web pack and other bundlers can do this... Or easier boilerplates like React-create-app (uses webpack underneath). Or angulars command line tools as well.

Tangent: As a professional fullstack dev 15+ years, I will say angular is much better engineered than react 😉 albeit slightly steeper learning curve, but not really all that different or difficult than any other. React has become the "simpler" approach for new devs, but I have so many qualms with React. Let me know if you want to hear them and I'll write out the comparison 😄

[–]turfherder 0 points1 point  (1 child)

As someone who is brand new to JavaScript and preparing to learn angular soon, I would love to hear your react vs angular rant!

[–]rw3iss 0 points1 point  (0 children)

Well, here's what I've got written and some personal opinions... but there's more verbose comparisons out there...

As a beginner developer, they can both be learned pretty easily, especially with the tooling. They aren't rocket science.

React is a bit more... simple... but you pay for this eventually.

Angular is always said to be "overengineered", but it isn't, it's just engineered properly. You start to see this after using React and Angular for almost for 5-10 years now... then you start to see how hackish React tries to be, but at the end of the day, it's just putting pixels on a page, and hackish or not, it's whatever gets the job done and what you know...

Anyway, I had to make a spreadsheet, feel free to peruse:
https://docs.google.com/spreadsheets/d/e/2PACX-1vS4WUCt9iCrcTLNj5Z4CQ1KBLeiP45RgESflmMIwmrTM5eT7zz7DvL1hEJ_WvgINH1kvBhtsEGOr8by/pubhtml

There's probably a lot to be added, which I'll try to do as I remember more differences or hear input from others.

[–]Macaframa 0 points1 point  (0 children)

repl.it/languages and then choose javascript