This code should print "hi" 3 times, but it doesn\'t always print.
I made a gif that shows the code being executed: