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.
@123xylem if smaller number preceeds a larger one, both digits make up a number and so you need to skip the next itiration, otherwise you would double count the following digit. E.g. 4 = IV. If you didn't skip you'd count 4 + 5 (IV + V).
cause u add pairs of number in sum
This comment is hidden because it contains spoiler information about the solution
it doesn't need to be converted.
because strings also have the attributes length and index.
So that you may iterate through every object in the array, in this case every roman numeral.
This comment is hidden because it contains spoiler information about the solution
I think it'd be worth adding another variable name to make the code a little more clear. It confused me that you were using the c variable for summing and carrying over a digit. For example, you could say var sum = ~~a.pop() + b.pop() + c instead of c += ~~a.pop() + ~~b.pop(). And then say res = sum % 10 + res
Thanks. And what's the point of saying dot not at the end or end? Wouldn't just saying dot not at end be okay?
Is there any reason for converting the string roman into an aarray?
I'm trying to console log the result object and I can't figure it out. How do you do it?
Good thinking to arrange the order of the letters from least to most common.
This comment is hidden because it contains spoiler information about the solution