@@ -100,7 +100,7 @@ In the above case, a number is being added to a string. JavaScript turns the num
100
100
Now let's output the current year, and auto-calculate the value of the next year using ** addition**
101
101
102
102
``` js
103
- var year = 2014 ;
103
+ var year = 2015 ;
104
104
var nextYear = year + 1 ;
105
105
106
106
console .log (" We are in " + year + " , but " + nextYear + " is just around the corner!" );
@@ -131,7 +131,7 @@ console.log("What kind of variable am I? " + iDontHaveAValue);
131
131
> The general convention in JavaScript is to use ` lowerCamelCase ` while naming variables.
132
132
133
133
### Operations
134
- The are are a number of operations you can apply, just like when using math.
134
+ There are a number of operations you can apply, just like when using math.
135
135
136
136
Let's section the output by outputting a title
137
137
@@ -194,7 +194,7 @@ if (!codebarIsAwesome) {
194
194
}
195
195
```
196
196
197
- > This should not output anything. Try setting ` codebarIsAwesome ` to false before running this expression.
197
+ > This should not output anything. Try setting ` codebarIsAwesome ` to false before running this expression.
198
198
199
199
> Did you use ` var ` ? Since we have already declared our variable, you shouldn't need to do that.
200
200
@@ -331,7 +331,7 @@ function popupHello(name) {
331
331
332
332
Now that you fixed the problem, call the function from you browser's console!
333
333
334
- > Don't add the call to the function in your ` script.js ` (It will get annoying to see it ever time you refresh!)
334
+ > Don't add the call to the function in your ` script.js ` (It will get annoying to see it every time you refresh!)
335
335
336
336
### Multiple arguments
337
337
@@ -362,7 +362,7 @@ To fix this, we must explicitly use `return` when we want the function to give u
362
362
Change the function to
363
363
364
364
``` js
365
- return x+ y;
365
+ return x + y;
366
366
```
367
367
368
368
> Anything after the return will be ignored. What happens when you add some content before the end of your function but after defining ` return ` ?
@@ -371,7 +371,7 @@ You can fill an argument of a function with a call from another function. It's c
371
371
372
372
### Scope
373
373
374
- When we declare variable within a function, they are not visible outside it.
374
+ When we declare a variable within a function, they are not visible outside it.
375
375
376
376
``` js
377
377
function subtractNumbers (x ,y ) {
0 commit comments