Create a counter object that has the following properties:
currentwith a value of0;- the
incfunction, which adds1to thecurrent.
The function should return the value, not print it.
Create a counter object that has the following properties:
current with a value of 0;inc function, which adds 1 to the current.The function should return the value, not print it.
Create a free account to access the full topic