We've written this code:
fun mainFunction() {
println("My name is Andy")
println("I code in Python")
println("I have a dog")
println("My name is Mike")
println("I code in Java")
println("I have a cat")
println("My name is Sarah")
println("I code in JavaScript")
println("I have a parrot")
}
Write the same code in a better way by creating and calling a function with parameters printMessages()
Free plan: 30 tutor messages. PRO is unlimited.
Saved
Ctrl + Enter to check
