The console reproduce only my first code wrotten

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.

Thank you! :slight_smile:

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 .replit file/the run command for every new file you want to run:

  1. Click the next to “Files”
  2. Click “Show hidden files”
  3. Open the .replit file
  4. Change the entrypoint and run commands to the file you want to run
Images

Dots

Show hidden files

edited

Also see the docs on how to configure a Repl: https://docs.replit.com/programming-ide/configuring-repl

2 Likes