103 passed 1 failed...can't figure out what 'the walk should bring you back to start' means
Can someone explain what's going on here, please?
What's that?? How does it work?
This comment is hidden because it contains spoiler information about the solution
Fantastic!
Was a hard kata for me. Defo, not 8 kyu
Thanks for your explanation.
array || [] evaluates to array when array is a truthy value and otherwise evaluates to an empty array.
array || []
array
So, array = array || [] will set array equal to an empty array if it does not already refer to an object.
array = array || []
Not sure what array = array || [] means and how it returns 0
So elegant!
OMG!!
How does this code work? I tried it in the VS and it didn't, because r is not defined.
Loading collection data...
103 passed 1 failed...can't figure out what 'the walk should bring you back to start' means
Can someone explain what's going on here, please?
What's that?? How does it work?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Fantastic!
Was a hard kata for me. Defo, not 8 kyu
Thanks for your explanation.
array || []
evaluates toarray
whenarray
is a truthy value and otherwise evaluates to an empty array.So,
array = array || []
will setarray
equal to an empty array if it does not already refer to an object.Not sure what array = array || [] means and how it returns 0
This comment is hidden because it contains spoiler information about the solution
So elegant!
OMG!!
How does this code work? I tried it in the VS and it didn't, because r is not defined.