| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5737918 commit 7699cb0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,9 +13,9 @@ function foo() { | |||
| 13 | 13 | var b = a * 3; // b cannot be accessed outside foo function, but can be accessed by functions | |
| 14 | 14 | // defined inside foo | |
| 15 | 15 | function bar(c) { | |
| 16 | - var b = 2; // another `b` variable is created inside bar function scope | ||
| 17 | - // the changes to this new `b` variable don't affect the old `b` variable | ||
| 18 | - console.log( a, b, c ); | ||
| 16 | + var b = 2; // another `b` variable is created inside bar function scope | ||
| 17 | + // the changes to this new `b` variable don't affect the old `b` variable | ||
| 18 | + console.log( a, b, c ); | ||
| 19 | 19 | } | |
| 20 | 20 | ||
| 21 | 21 | bar(b * 4); | |
@@ -61,7 +61,7 @@ var a = 1, b = 2, c = 3; | |||
| 61 | 61 | Use your knowledge of the variables' `scope` and place the following code inside one of the functions in `scope.js` | |
| 62 | 62 | so the output is `a: 1, b: 8, c: 6` | |
| 63 | 63 | ```js | |
| 64 | - console.log("a: "+a+", b: "+b+", c: "+c); | ||
| 64 | + console.log("a: " + a + ", b: " + b + ", c: " + c); | ||
| 65 | 65 | ``` | |
| 66 | 66 | ||
| 67 | 67 | Check to see if your program is correct by running this command: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments