Hello, I am puzzled as to why I am not receiving the expected values. Here is an example that illustrates my issue. Although it may be a simple question, I cannot recall encountering this problem previously...
const arr = [4,1,9,5,6];
arr.sort((a, b) => {
console.log(a);
});
Expected output:
// output: 4,1,9,5,6
Actual output received:
// output: 1,9,5,6
I have a recollection of the initial value "a" displaying all the array items in the past. Is there something that has changed recently?