Ad
  • Custom User Avatar

    I'm not sure if this is doable, but there isn't any way in which you enforce the disuse of the "==" operator. Otherwise, it's a great little thought experiment in computer science!

  • Custom User Avatar

    From what I understand, it might be better to reword the description to indicate they you would like the trailing zeros removed. The trailing zeros mean that there are numbers of significance that are just "out of view," but we can make a function that chops those off for sure. It's just a bit unclear when you are just asking to have the number turned into a string.

  • Custom User Avatar

    It may be that I'm missing something, but wouldn't this fail an array such as [0, 4, 6]? This function would return 5 if I'm not mistaken, not 2 as it should.