Created
October 17, 2017 10:20
-
-
Save cpq/939cbf6998359c9389d3a819e211a5bf to your computer and use it in GitHub Desktop.
JS args
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
| //////// old | |
| function old1() { | |
| }; | |
| function old2() { | |
| old1(); | |
| } | |
| old2(); | |
| ////////// new | |
| function new1(v) { | |
| console.log(v); | |
| }; | |
| function new2() { | |
| var myLocalVar = 123; | |
| new1(myLocalVar); | |
| } | |
| new2(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment