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.
thanks for the explanation!
I did not know about Math.sqrt() yet. Great way to learn about it.
This comment is hidden because it contains spoiler information about the solution
i spent an hour trying to use logarithms and weird stuff to manually turn decimal to binary the way i would with pen and paper before i remembered you could just do this... im gonna cry
You don't have to worry with strings with less than two characters.
Did you forgot this rule? If you put 1 or 0 symbols it returns "" but should return the same string.
This comment is hidden because it contains spoiler information about the solution
Cool! I didn't know about this method
Amazing bro ! Best Practise
smart way to represent isInt
I mean it works as you say. Plus, this is common behavior. C and C++ return the same. You'd be adding extra code to handle something that is internally handled for you.
As far as my understanding goes if you go with a minus symbol it starts from the index of the last character and cuts as many characters as you need, -1 cuts the last, -2 cuts the last two and -3 cuts the last three characters just like with positive numbers but in a reversed manner.
I'm new to coding, this is sick! THANKS!
You can.
You can. What OP did is use the .slice() method, which removes the first and last portion of the string. Your method is still valid (and is what I ddi too).
This comment is hidden because it contains spoiler information about the solution
Loading more items...