cool thank you!
This comment is hidden because it contains spoiler information about the solution
can you explain this solutin to me?
if we have a negative (-num) makes it positive and then (abs) should leave it positive
but it's not - why is that?
it's not just one liner. You use return when you want to return from the function early. In fact return doesn't mean to return with a value - that's optional, it just means interrupt this function here.
return if b
This will return with nil not evaluating c if b.
Otherwise on the last line of the function it's more Ruby-esque not to use return
is it best practice to not explicitly use 'return' for a 1 liner?
No need for double quotes. A single-quoted strings don’t process ASCII escape codes, and they don’t do string interpolation while double-quoted does both.
Why didn't I think of that?!?! Genius!!!
Wow. I just realized how easy the sequence is.
Is this mathwars? :P
this is handled by the return false if open < 0 line
return false if open < 0
Maybe I"m missing something but this fails with a string of "((" or even "(()(" no?? Granted i didn't solve it..just trying learn
You are sayfidz 50 Style...!!! https://www.codewars.com/users/sayfidz/site-events