Ad
  • Custom User Avatar

    I'm getting occasional (appx 1 in 100) errors where my answer seems right. One example (using console.log on the arguments):

    { name: 'Rocky',
      health: 249,
      speed: 46,
      tactics: 
       [ 'punch',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile' ] } { name: 'Missile Bob',
      health: 233,
      speed: 85,
      tactics: 
       [ 'punch',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile' ] } { punch: 20, laser: 30, missile: 35 }
    ✘ Expected: '\'Missile Bob has won the fight.\'', instead got: '\'Rocky has won the fight.\''
    

    Another example:

    { name: 'Rocky',
      health: 58,
      speed: 61,
      tactics: 
       [ 'punch',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile' ] } { name: 'Missile Bob',
      health: 77,
      speed: 16,
      tactics: 
       [ 'punch',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile',
         'punch',
         'laser',
         'missile' ] } { punch: 20, laser: 30, missile: 35 }
    ✘ Expected: '\'Rocky has won the fight.\'', instead got: '\'Missile Bob has won the fight.\''
    

    I got one or two errors out of 107, then passed the kata on my third try. Then refreshed and tried again, got one error out of 107.

    Enjoyable kata, thanks.

  • Custom User Avatar

    Nice to have a challenging kata that taught me something new. But the difficulty level needs to be bumped (6kyu maybe), and the description should make some reference to generators. Many people (like me) will be coming across generators for the first time.

  • Custom User Avatar

    Using indexOf and lastIndexOf is your time-performance problem. Find another way to figure "are there at least two?" for each item.

  • Custom User Avatar

    Agreed, this is confusing. Suggestion: rewrite the description so that the code block following "Valid types of change include:" shows what the actual preloaded CHANGE dictionary will look like.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    The '||' is the part I didn't get. Since posting I've seen it many more times and figured out basically what it does. But I still can't find it mentioned on any JS reference or tutorial sites.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    OK, I misunderstood. Some katas have a reference object pre-defined, and I jumped to the conclusion that's what was going on here. Thanks.

  • Custom User Avatar

    I assume the "database" is an object. If so, we need to know what it's called to complete the kata.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Description should make clear that alpha will not always be {'ABCDE':1,'FGHIJ':2,'KLMNO':3,'PQRST':4,'UVWXY':5}.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    If you want the "total sum", wouldn't you add all the numbers? If "alternating sum" means something different, you should explain that in the kata description.

  • Loading more items...