Skip to main content
Edit answer based on commenter feedback (thanks @mEQ5aNLrK3lqs3kfSa5HbvsTWe0nIu)
Source Link

Kotlin, 6767 66 bytes

while(true1>0)"|/-\\".map{print("\rLoading... $it");Thread.sleep(250)}

enter image description here

Fairly self explanatory, using \r to clear the line and taking advantage of Kotlin's awesome string interpolation.

EDIT: Saved 1 byte thanks to @mEQ5aNLrK3lqs3kfSa5HbvsTWe0nIu by changing while(true) to while(1>0)

Kotlin, 67 bytes

while(true)"|/-\\".map{print("\rLoading... $it");Thread.sleep(250)}

enter image description here

Fairly self explanatory, using \r to clear the line and taking advantage of Kotlin's awesome string interpolation.

Kotlin, 67 66 bytes

while(1>0)"|/-\\".map{print("\rLoading... $it");Thread.sleep(250)}

enter image description here

Fairly self explanatory, using \r to clear the line and taking advantage of Kotlin's awesome string interpolation.

EDIT: Saved 1 byte thanks to @mEQ5aNLrK3lqs3kfSa5HbvsTWe0nIu by changing while(true) to while(1>0)

Source Link

Kotlin, 67 bytes

while(true)"|/-\\".map{print("\rLoading... $it");Thread.sleep(250)}

enter image description here

Fairly self explanatory, using \r to clear the line and taking advantage of Kotlin's awesome string interpolation.