Ad
  • Custom User Avatar

    If you're going to write a wrapper function for testing, make sure it can't be hijacked by solver ( defining it with const is one way to do that ).

    Native Math does not have enumerable properties. In keeping with this, and to teach good habits, defined methods should not be enumerable, and this should be tested for.

    toFixed does rounding differently from Math.round ( and weirdly in general ). This behaviour should be warned for and toFixed should ideally be discouraged and tested against.

    Rounding is not the appropriate solution for floating point representation inaccuracy. This has been dissed as an issue below, but again, it's teaching bad habits.

  • Default User Avatar

    What kind of rounding is expected for values ending with 5?
    Existing solutions return different results for Math.toRadians(-60.87676573264997) and they all pass the tests.