I'm trying to push a number to the end of an array without using the push function.
The array returns [1,2,3,10] but the array.length returns 8. I assume it's counting arr twice and the two numbers in 10 = 8. I don't know why.
function push(array, value){
arr=arr+','+value
return arr.length
}
var arr = [1, 2, 3]
console.log(push(arr, 10)) // expecting 4, get 8