Ad
  • Custom User Avatar

    Little bit confused since my function does recieve it in order. But not in the correct objects for the test?

    Sends: [A1,B1,A2], Recvs [B1,A2,A1]
    Expected: {"a":["b1"],"b":["a1","a2"]}, instead got: {"a":[],"b":["a1","b1","a2"]}
    

    As you can see, the test sends:

    [A1,B1,A2]
    

    And my function (incorrectly?) returns:

    instead got: {"a":[],"b":["a1","b1","a2"]}
    

    Sort of understand why, but any input? How would a recieve function execute correctly before an argument is sent?

  • Custom User Avatar

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

  • Custom User Avatar

    A bit confused on how getBodyLength()? works. Would you mind displaying the code in the instructions, or post it on here?

  • Custom User Avatar

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

  • Custom User Avatar

    Cool, I think I understand now that it's broken up. Is there a formal coding term for this unique navigation (so I can read into it)?

  • Custom User Avatar

    Read the comments, but still can't understand the instructions/problem. Can anyone enlighten me, as if you were explaning this to child XD?

    Confused what the solution means, example

      var test_processes = [
          ['gather', 'field', 'wheat'],
          ['bake', 'flour', 'bread'],
          ['mill', 'wheat', 'flour']
      ];
    
    processes('field', 'bread', test_processes); 
    // should return ['gather', 'mill', 'bake']
    

    Wouldn't the shortest distance between 'field' and 'bread' be 'wheat' or 'flower'? Since those are the nodes from 'field' --to--> 'bread'?

  • Custom User Avatar

    Hey, if you don't mind me asking, how were you able to test/run this? This code works on codewars enviroment, but when I try using babel/webstorm and compiling it to es5, I get errors.

  • Custom User Avatar

    Instructions not very clear. Please provide more detailed input/output examples