- Implement only
Array.prototype.sort2. Do NOT overrideArray.prototype.sort. - Keep the given scaffold: define
sort2via[].__proto__.sort2 = function(compareFunction) { ... }insideapplyCustomSortinsrc/arrayMethodSort.js. sort2must sort the array in place and return the original array (same reference, not a copy).- When
compareFunctionis not provided, compare elements as strings (their default string representation, by character codes). Example:[3, 12, 2, 11].sort2()must return[11, 12, 2, 3]. - When
compareFunctionis provided, use its return value to order elements: negative → first before second, positive → first after second. - Do NOT call the built-in
Array.prototype.sortin your implementation. Write your own sorting algorithm (bubble sort, insertion sort, etc.).