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.
how so? /genq
strings are immutable, there's no differece converting the whole name or fisrt char if youre not reassociating.
well done then
That was just the default comment.
Would it be good practice to convert to a number if you plan on working with TypeScript or if you don't want type-coersion related bugs in your code?
It's clever because it's simple, fast and correct.
The string comparison is comparing the first digit, and 5 is greater than 1, so it terminates the comparison. If they were equal it would proceed to the next digit.
removed 2nd condition
This comment is hidden because it contains spoiler information about the solution
Why I am getting this?:
This comment is hidden because it contains spoiler information about the solution
Rewrote the description.
If already, it should have used an array of the solutions and returned solutions[i] instead of any other logic.
i was thinking the same thing :)
Ideally it should be something like this:
int remainingPages = itemCount() % itemsPerPage;
if(remainingPages == 0 || pageIndex < pageCount() - 1) return itemsPerPage;
else return remainingPages;
Loading more items...