Ad
  • Custom User Avatar

    The tests are fine, your code is not. It fails tests like this one:

    assert.strictEqual(longestConsec(["zone", "abigail", "theta", "abigail", "form", "libe", "zas"], 2), "abigailtheta")
    

    It doesn't return the first one.

  • Custom User Avatar

    Count the number of divisors of a positive integer n.

    A positive integer is an integer greater than 0.

    But if you want to be sure, then yes you could validate the input too. Not needed here tho.