Ad
  • Custom User Avatar

    This kata is a candidate for retirement as it relies on contraints which are not enforced well, and are very difficult to enforce. Please join the discussion and share your opinion on whether this kata should be kept, or retired: https://github.com/codewars/content-issues/issues/167.

  • Default User Avatar

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

  • Default User Avatar

    Id just like to ask what exactly temporary arrays and objects are

  • Custom User Avatar

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

  • Custom User Avatar

    No random tests

  • Custom User Avatar

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

  • Custom User Avatar

    Node 12.x should be enabled.

  • Default 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

  • Default User Avatar

    Please point out that the JOSN.stringify is not allowed also.

  • Custom User Avatar

    I think the kata description should be updated to say no regex. I originally wrote a solution using String.prototype.replace (which isn't an Object or Array prototype method) only to find on submission that replace isn't allowed.

    I enjoyed this kata, otherwise.

  • Custom User Avatar

    You are NOT allowed to use any temporary arrays or objects.

    I'm not entirely sure what it means exactly by not allowed to use temporary objects. Am I allowed to use temporary vars to store Number? (e.g. let x = array[i - 1])

  • Custom User Avatar

    However, you can still use the methods of an array, and can't resolve with the Regex.

    arr['slice'](i, 1)[0]
    arr['re' + 'du' +'ce'](i, 1)[0]
    

    You can use monkey patching method to built-in objects.

    I posted to the gist, and you can use it.

  • Default 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