function reverse(array,item){
let word = Math.ceil(array.length/2)
return array.splice(word,0,item)
}
console.log(reverse([1,2,4,5,6],3))
I was wondering why I'm getting a an empty array when the I call the function, instead of [1,2,3,4,5,6]?