Hi! I am new in Replit and I have the free account.
The console only does the first I wrote, even when I close it, the console still reproduce the result of the first code.
If you can please help me to let the console know to reproduce my 2nd, 3d… code that would be very kind.
So unlike most IDEs, Replit does not run the current open file, and instead runs the main file by default.
Instead of creating new files for every program you want to make, you should create a new Repl.
Alternatively, you can change the
entrypoint in the
run command for every new file you want to run:
- Click the ⋮ next to “Files”
- Click “Show hidden files”
- Open the
- Change the
run commands to the file you want to run
Also see the docs on how to configure a Repl: https://docs.replit.com/programming-ide/configuring-repl