Created
April 18, 2017 07:25
-
-
Save anonymous/bcc7af5a74c447823742c3f0fb3176a5 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