Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
You should keep your
print
s inside the function scope. Here's an example:Hi everyone. I am trying to solve the challenge, Exclamation marks series #11:
(Find all vowels in a string and replace them with Exclamation marks)
I am using the Kotlin language.
I am not looking for a solution but instead looking for the reason for the error that follows when I submit a simple test.
Here is my code:
fun replace(s: String): String = s
println(s)
return s
I get 4 errors all to do with my println() statement.
src/main/kotlin/solution.kt:2:1: error: expecting a top level declaration
println(s)
^
I was just trying to see what was being passed in to s.
Can someone explain to me what I am missing??
Thanks