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.
because in my opinion it is readable, no more. You shouldn't attribute your complexes.
Your first take was: "the sum first and then the multiplication..?"
Ok, "2+2*2 = 8" guys, chill
Let these people learn math base rules first, not rust.
It's ridiculous to make such mistakes.
––––––––––––––––
Edited: But now i see u edited and mean clarity way, ok, i agree with that, but strange thing yet
https://stackoverflow.com/questions/5971645/what-is-the-double-tilde-operator-in-javascript
Nevermind, I didn't see the other replies.
I don't get the part where c is a boolean but also remembers carrying the number into the next loop.
Why is that?
Edit: got it.
If you add a variable with true to a number the truth equals to one.
So:
var a = 5
andvar b = true
becomes witha + b
a solid6
.Didn't know that.
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
This comment is hidden because it contains spoiler information about the solution
It looks like we are expected to include a .equals method as well even though it is not specified.