-
-
Save AliceWonderland/eba31f47c39faee4fb065ef433b165cb to your computer and use it in GitHub Desktop.
7.1 Counter created by smillaraaq - https://repl.it/HHjJ/1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var counter = 0; | |
function increment(num){ | |
counter += num; | |
console.log("counter: " + counter); | |
} | |
increment(2); // counter is now 2 | |
increment(6); // counter is now 8 | |
increment(-1); // counter is now 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment