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.
You cannot! But I can't stop anyone adding a polyfill..
Let's use the test FArekkusu gave you:
Test.assertEquals(high("aa, z"), "z")
First case (a: 1, z: 26), highest scoring word is "z" as expected.
Second case (a: 1001, z: 1026) highest scoring word is "aa".
Do you see the difference now?
Can I use the new 'BigInt' in javascript??
Ty guys but I still don't get the problem with 1 == 1 === 1001 == 1001
I saw the top solution and there a = 0, b = 1 istead of a = 1, b = 2
The statement of this kata needs to be a bit more clear about what the score for a word means. i.e Score for a word is the sum of points of its alphabets. Perhaps an example will help.
It does matter when the strings haven't the same length.
Add
Test.assertEquals(high("aa, z"), "z")
to the sample tests, and tell me why your code doesn't pass it.Hi FArekkusu, it doesn't matter because 98 - 96 > 97 - 96 or 196 - 96 === 196 - 96.
Actually not, you should add a test like
high("aaa b")
for all languages to test if a value is 1 or 0.You have no
- 96
.This comment is hidden because it contains spoiler information about the solution
Is this the most time efficient? :D
Thank you