In a workout devoted to JS Core the task to the insight "Get a random item from an Array" contains an error.
The situation in the task is absolutely equal to the explanation.
Math.random returns a random number between 0 (inclusive) and 1 (exclusive).
Multiplying by the length of the array we get the interval [0, 3).
Using Math.floor we found a number downward to its nearest integer, so we can get 0, 1, 2. It's fine.
The app indicates choosing Math.floor incorrect and accepts Math.ceil.
But it rounds a number upward to its nearest integer, sowe can get out of the required interval. E.g.: the result of Math.ceil(2.37..) will be 3, but there is no any element with such an index in the given array.
I think it's an error in the app. The answer should be "floor".