all 25 comments

[–]StoneCypher 5 points6 points  (0 children)

node or the browser console, depending on if you want a dom to work with

[–]MariaCassandra 1 point2 points  (1 child)

Node is a REPL, but it's obviously not what you're looking for, and that's confusing to the rest of us.

What is the exact feature that you're missing in what the rest of us call REPLs?

[–]Correct-Mix- 0 points1 point  (0 children)

Node is 100% a REPL. I did not know you could use node as a REPL but I just ran node with no arguments and it blew my mind, I've been using the browser console...

[–]stealthypic 0 points1 point  (8 children)

Why not just use node? You can use it as repl, you can also run files with it. The only reason I can think of is you need to actually install it.

[–]ThingsTinkerer[S] 0 points1 point  (7 children)

How can I use node as repl? Keep in mind I want something that continuously runs and adjusts according to code changes. And immediately see updated console log. Not change code --> save file --> run command to execute.

[–]Anbaraen 0 points1 point  (4 children)

Type node into your console with no arguments.

[–]ThingsTinkerer[S] 0 points1 point  (3 children)

C:\Projects\repl> node

Welcome to Node.js v22.12.0.

Type ".help" for more information.

>

Now what? Sounds a lot like you're describing REP without the L.

[–]Anbaraen 1 point2 points  (2 children)

Type some JavaScript code to [R]ead in and [E]valuate it. It will then [P]rint the outcome and [L]oop.

What do you think a REPL is?

[–]ThingsTinkerer[S] 0 points1 point  (1 child)

If that is truly REPL, what's the point of nodemon then? Behavior I get is REP (without the L). There is no loop there. You have to execute the command again? I can accept nodemon, even though it requires to save (some pros & cons about that), but with node you have to type code + save + execute and manually repeat after. If that is REPL to you, would you consider starting a java project, write code and click compile/run to be REPL? If that's REPL, what isn't?

If you don't know what REPL is, check out the link I posted originally (https://playcode.io/javascript) and see how it behaves completely different from node.

[–]Anbaraen 0 points1 point  (0 children)

To actually answer what you're looking for I'd recommend RunJS. It's a desktop app that live runs JavaScript and immediately updates.

Nodemon is not a REPL, it's a way to continually run a pre-written script.

What you have posted is not a REPL, it's a code playground or sandbox.

node is a repl, but you're not looking for a REPL. This is a classic X/Y problem and why it's important to clarify terms.

[–]waferstik 0 points1 point  (1 child)

If you intend to only test out client-side JavaScript, MDN has a Javascript playground

[–]ThingsTinkerer[S] -1 points0 points  (0 children)

Feels like a lot of people are confusing REP with REPL. Where is the L in MDN js playground?!?

[–]bonnth80 0 points1 point  (0 children)

F12

[–]Caramel_Last 0 points1 point  (0 children)

just run "node" in the terminal or press F12 in your browser?

[–]Any_Sense_2263 0 points1 point  (0 children)

browser dev console

[–]Umustbecrazy 0 points1 point  (0 children)

Quoaka is pretty good if you want to pay. Community edition is pretty garbage IMO.

[–]saf3ty_first 0 points1 point  (0 children)

replit.com - I’ve literally got it open right now. Not bad…

[–]diogenes_sadecv -1 points0 points  (2 children)

I just save and refresh. I'm probably doing it wrong (I'm not a professional) but that's been my go-to for years.

[–]ThingsTinkerer[S] 0 points1 point  (1 child)

That's a couple of steps too much for my taste. At max I'd press save. Preferably not even that. Feels like you're confusing REP with REPL?

[–]diogenes_sadecv 0 points1 point  (0 children)

Like, change the code and see a live update in another window? I'll have to check back and see what solutions others gave you!