How come the following code is giving me a 0 instead of a 1? I want my function to change a variable declared outside the function but I do not want to specify the variable
Actually you could just add console.log(input) inside the function and it would work just fine.
console.log(input)
Please correct me if i'm wrong. Hope i helped !!
I would be glad if somebody could explain why im wrong