Ad
  • Custom User Avatar

    many of those 3000 solutions solved the problem in less than 5 lines. I don't understand those concepts yet. Like I said, I'm still new at coding and even newer at code wars. I have failed many a kata because of bad code, but in this case I was facing an issue that couldn't be explained away by bad code because my code worked elsewhere. I didn't realize that flagging something as an issue was an affront to the kata, I just thought I was raising my hand and asking for help with an issue I was having. No insult intended. This kata was fun. And now I have access to the 3000 solutions you mentioned so I can experiment with those methods and level up my JS skills and never again embarrass myself by using an unsupported function. But to get to that point, I needed to find a solution that made sense to me. I hope to reach your level of mastery one day, but we all have to start somewhere, right?

  • Custom User Avatar

    I'm still new at this so it's not surprising that 3000 people are better at JS than me. I was trying to get to the bottom of the issue I was having, which was the error message that said "Object.values is not a function." In hopes that I could learn more about JS. My code worked in codepen, so I wanted to know why it wasn't working here.

    The solution to my issue was discovering that this interface, like many others, doesn't support Object.values.

    If you run into this problem, replace 'Object.values(var)' with 'Object.keys(var).map(key => var[key])'

  • Custom User Avatar

    error message(Object.values is not a function) works in codepen. Works everywhere else. What the fuck.

  • Custom User Avatar

    Can't recurse? I copy pasted my code and test questions into codepen and everything worked. Ran it here and it told me "chained(...) is not a function." I know it can be done with a for loop, but isn't the recursive method the most ellegant way to handle this kind of problem?