Skip to content
Sign upLog in
← Back to Community

Why does Javascript show up as Nodejs and why doesn't my simple js code not run?

Profile icon
mhs_mhs123

Hey all,
I'm new to programming, currently learning python and just starting to dip my feet in javascript, when I made a repl for js, it shows up as a nodejs repl. Because of this, my code isn't running. How do i fix this? Thanks

https://repl.it/@mhs_mhs123/javascript1

Answered by Vandesm14 [earned 5 cycles]
View Answer
Voters
Profile icon
ZergurVorghiz
Profile icon
mhs_mhs123
Comments
hotnewtop
Profile icon
Vandesm14

Repl.it has removed the old JS repl in favor of the Nodejs framework. I suggest learning Nodejs as it is expandable and easier to use. But to run your old code, you can either create an HTML repl and place the code into the script.js file, or fork my preservation of the JS repl: https://repl.it/@Vandesm14/JSRepl

Please mark this as answered if I helped your problem 👍

Profile icon
mhs_mhs123

@Vandesm14
Thanks for your reply. This may seem like a dumb question, but what is the difference between nodejs and js? Also, if nodejs is built off of javascript, why doesn't my code run?

Profile icon
Vandesm14

@mhs_mhs123 Javascript is the browser-side of the language. But Javascript was implemented to be a server-side integration with Nodejs. This means that Nodejs can pull libraries internally with npm, modify the filesystem, and even work as a webserver. So instead of being stuck on the client, Javascript can be used on Client AND the Server, giving developers ease of fewer languages for the ends of their project.

Profile icon
mhs_mhs123

@Vandesm14
Thanks!

Profile icon
WEBS

Hi. I saw your repls. I Made a mockup for a Website, but i Need someone coding it.

@Vandesm14

Profile icon
Vandesm14

@WEBS
Contact me on Discord: Vandesm14#3364

Profile icon
WEBS
Profile icon
rupinYAY

They have also regular javascript but Nodejs is the v8 version of javascript so Nodejs is only a higher version then script.js. Fun fact in Nodejs instead of calling it script.js it is index.js!

Profile icon
CharlieBonsor

Try using a html repl (You can use alert,prompt,etc)