Ad
  • Custom User Avatar

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

  • Custom User Avatar

    why would you even treat zero differently? looking at your solution and couldn't get it.

    BTW, there is no need to put your solution into the comment ;)

  • Custom User Avatar

    I guess I'm wrong. I checked the MDN and they define Math.round to only round to the tenths place, too.

  • Custom User Avatar

    Correct me if I'm wrong, but shouldn't the number of significant digits be clarified for rounding? This kata seems to only consider the tenths place significant, but if additional places were significant, rounding would differ (ie 0.499 would round to 1 if the hundreths and/or thousandths were significant). I initiallly looped through the decimal digits to account for greater rounding accuracy, but was surprised to get this result "Math.round(2.49999) - Expected: 2, instead got: 3".

  • Custom User Avatar

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