We've wrritten this code:
func mainFunction() {
print("Hello AlgoCademy!")
print("Coding is amazing!")
print("Functions are so useful!")
print("Hello AlgoCademy!")
print("Coding is amazing!")
print("Functions are so useful!")
print("Hello AlgoCademy!")
print("Coding is amazing!")
print("Functions are so useful!")
}
Write the same code in a better way by creating and calling a function printMessages()
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check