Ad
  • Custom User Avatar

    I don't know if this is intentional or not, but I feel that the ordering of the input is poor/non-intuitive. If (as the exercise's prompt states) the input is an array [a, b, c, d] representing the two points (a, b) and (c, d), then it stands to reason that a and c are the x-coordinates of the two points; likewise, c and d would be their y-coordinates. However, the slope values expected in the test cases return the reciprocal of the slope. In other words, the expected answers seem to be calculated as the difference quotients of the x-values over the y-values as opposed to the difference quotient of the y-values over the x-values, right?