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.
I was sure it's gonna explode given 0 but i guess not
You should use the return function instead of console.log
I am assuming you are writting on JavaScript since you are using the console.log function
Lets say your code looks like this
function oposite(n){
result = #Code
console.log(result)
}
Here, you will print that on the console, but wont return it
You should change it to:
function oposite(n){
result = #Code
return result
}
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Read this: https://docs.codewars.com/training/troubleshooting/#expected-the-same
This comment is hidden because it contains spoiler information about the solution
nice kata
That's so much more concise than what I created!
I learned how to change a positive number to a negative number. Thanks for the teaching me something new today!
I did not know you could do this
Very nice solution !!! Awesome)
WUUUUUUUUUUUUUUUT!??!?!?
Please mark your post as having spoiler content next time. And close the question if it was answered.
understood thanks a lot
You need to return your solution, not print it.
Loading more items...