I was hoping I could override what is displayed by console.log. I was assuming the below:
const arr = ['ben', 'john', 'amy'];
Array.prototype.toString = function(){return 'alex';}
console.log(arr); // hoping this could result in 'alex' being printed to the screen. Prints the array.
I was hoping I could make the array print my 'alex' override to the screen but it looks like that is not how console.log works. The toString function must not be was is used to determine the log. Does anyone know how this is determined or if it can be overridden?