Ad
  • Default User Avatar

    I am not an expert by any means, but at a first glance, you are reserving extra space with var j, when you could use parameter x directly.

  • Custom User Avatar

    You need to return your output; returning the value means the value is retained from that function call. The value retained can be checked and checked for equality against the expected answer. You are attempting to modify to the HTML on the page, which can only be check locally, not globally.

    All katas on this website work like this.