/**
* Read FAQs section on the left for more information on how to use the editor
**/
/**
* DO NOT CHANGE FUNCTION NAME
*/
function customReverse() {
// DO NOT REMOVE
'use strict';
function swap(a,b){
let temp = a
a = b
b = temp
}
// write your code below
let i = 0
let j = this.length
while(i < j){
swap(this[i], this[j])
i++
j--
}
return this
}
Array.prototype.customReverse = customReverse;
Read-only