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.
This comment is hidden because it contains spoiler information about the solution
So Javascript just wants to join in on the OOP club?
As far as i know, because this one is still considered as an object, where you can directly write function rather than declaring 'class' first, it is also known as Constructor Function.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Nobody's going to change the kata requirements after 13k completions.
In the solution,
.reduce(:&)
could be replaced with.all?
.From the instructions:
FWIW, in real life leading zeros are valid in an IP address (try pinging
127.000.000.001
).This comment is hidden because it contains spoiler information about the solution
I'm not disagreeing with you because I'm still learning JS, but as a programmer that seems wrong to me. Since you can't confirm what type the input will be, wouldn't it be best to check against undefined rather than your method? I mean again, it's clever - but would you really want to use it in production? Is it faster to make sure the input isn't falsy, AND use the code above?
This comment is hidden because it contains spoiler information about the solution
Very clever, but is this a best practice? It's not immediately clear what's going on, whereas the other solutions are.
Absolutely true!!
I am learning this now and I dont know a hell of it :)
thanks for thinking in us :))
I had opened a tab with MDN JS docs to read through for the explanation you gave here. thanks ^ ^
Loading more items...