when the code is started in the console, the console is very slow and repeating the same process again and again. It automatically stops and it keeps on going in a loop