• ###### Syd7777commented on "Opposite number" python solution

I was sure it's gonna explode given 0 but i guess not

• ###### AlcalinoDevcommented on "Opposite number" kata

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
}

• ###### bixhiiccreated a suggestion for "Opposite number" kata

This comment is hidden because it contains spoiler information about the solution

• ###### munaimprocommented on "Opposite number" kata

This comment is hidden because it contains spoiler information about the solution

• ###### CadenMcommented on "Opposite number" kata

This comment is hidden because it contains spoiler information about the solution

nice kata

• ###### Divine Danielcommented on "Opposite number" python solution

That's so much more concise than what I created!

• ###### adamb123commented on "Opposite number" javascript solution

I learned how to change a positive number to a negative number. Thanks for the teaching me something new today!

• ###### DC_coder_geniuscommented on "Opposite number" csharp solution

I did not know you could do this

• ###### MirazimovDcommented on "Opposite number" python solution

Very nice solution !!! Awesome)

• ###### Douxescommented on "Opposite number" python solution

WUUUUUUUUUUUUUUUT!??!?!?

• ###### Chrono79resolved a question on "Opposite number" kata

Please mark your post as having spoiler content next time. And close the question if it was answered.

• ###### azizftw7commented on "Opposite number" kata

understood thanks a lot

• ###### Captain Quackcommented on "Opposite number" kata

You need to return your solution, not print it.