Skip to content
← Back to Community
How to repeat code? (Make it restart)
Profile icon
Mendelevium

Maybe I am crazy, but I can’t figure out a way to make the code repeat. I’ve tried everything!
Does anyone know how to do this?

Voters
Profile icon
TomS12
Profile icon
GuyMarmor
Profile icon
sdmaycats
Profile icon
AaronConnolly1
Profile icon
SOFIALECHADO
Profile icon
SpaceMice
Profile icon
Mendelevium
Comments
hotnewtop
Profile icon
iPenguin

https://repl.it/@iPenguin/rock-paper-scissors

All you need is a while true loop. This makes it so that it will repeat the code if [yes]. Other examples of the while loop are (repeat if [variable is greater than 12]). The link above is a fork I made with the loop. Nothing else is changed except for typos ("ebter," etc.)