Consider the following code snippet:
const fruits = ['banana', 'apple', 'cherry', 'date'];
fruits.sort((a, b) => a.localeCompare(b));
console.log(fruits);
What will be the output of the console.log statement?
Consider the following code snippet:
const fruits = ['banana', 'apple', 'cherry', 'date'];
fruits.sort((a, b) => a.localeCompare(b));
console.log(fruits);
What will be the output of the console.log statement?