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.
s.charAt(i) - returns the character code from the ASCII table. The number codes are sequential: '0', '1', '2' ... '9' or in the form of code 48, 49, 50 ... 57. For example, "2".charAt(0) = '2' or 50 (character value and code), but we need to get the number 2,to do this, we just need to subtract the character code '0' (48). "2".charAt(0) - '0' = 50 - 48 = 2
Why is there -'0' included ? What does it mean ?