Ad
  • Custom User Avatar

    Try running this and look closely at the value of index 1 -in both arrays.

    let array1 = [7, 4, 6, 8, 0, 5, 1, 0, 3, 7, 4, 9, 2, 8, 3].sort((a, b) => a-b).map((v) => v * v );
    let array2 = [25, 36, 4, 0, 16, 9, 1, 64, 1, 9, 81, 16, 49, 49, 64].sort((a, b) => a-b);
    console.log("array1", array1);
    console.log("array2", array2);

    They aren't the same. When given these two arguments the function should return false -although it's not the clearest from the description.

  • Custom User Avatar

    Tests are fine. Please stop spamming.

  • Custom User Avatar

    Please use a spoiler flag when you post code, so that users who didn´t solve the kata cannot see it; I put the flag for you this time. Also use markdown tags to format your code or it's not usable. Refer to the documentation about this and more: https://docs.codewars.com/training/troubleshooting/#post-discourse