Ad
  • Custom User Avatar

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

  • Custom User Avatar

    This Array(index+1) creates some undefined elements and the number of the undefind elements depends on what is passed as an arguement to the Array(), which in this case is index + 1, and the .join(x.toLowerCase()) fills up the undefined elements with x lower cased.

    I hope this makes sense too.

    PS: This is not a good practice because of the undefined elements that is created.

    Thanks.