Skip to content
Sign upLog in
← Back to Community

How to run a js file

Profile icon
debopam

Created a new file, named it qstring.js -- contains a few console.log calls
But when i run it, nothing gets printed out

Voters
Profile icon
MahinPatel9
Profile icon
OliverDing1
Profile icon
ParthPatel168
Profile icon
shakilpendhari
Profile icon
Walexwisdom
Profile icon
AleeWongka
Profile icon
Mark-JosephJo11
Profile icon
TabassumTamboli
Profile icon
giorgiiobashvil
Profile icon
SHRISTIGUPTA3
Comments
hotnewtop
Profile icon
Zavexeon

That's because in replit index.js will always be ran first. In the shell (accessed by hitting F1 and clicking "open shell" on the popup menu) type node qstring.js.