Variable Scope
printNumbers
that logs to the console the numbers from 1 to a given number n
, and also logs the value of a variable count
that keeps track of the number of times the function has been called. The variable count
should only be accessible inside the printNumbers
function and should be initialized to 0 every time the function is called.