How can I change the function passed params?
function minus_num(num) {
num -= 1
}
var num_test = 10
while (num > 0){
minus_num(num_test)
}
console.log(num) // there I want to get the 0, but it is infinite loop, because the `num` will have a copy in the function.
How can I change the num_test
itself?