Operator spacing and unclosed quotes
This commit is contained in:
parent
d39750fc29
commit
05d39b3fc7
1 changed files with 2 additions and 2 deletions
|
@ -216,7 +216,7 @@ switch (age) {
|
|||
alert("Won't work"); // the result of prompt is a string, not a number
|
||||
|
||||
case "18":
|
||||
alert("This works!"");
|
||||
alert("This works!");
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -273,7 +273,7 @@ We covered three ways to create a function in JavaScript:
|
|||
|
||||
|
||||
- Functions may have local variables: those declared inside its body. Such variables are only visible inside the function.
|
||||
- Parameters can have default values: `function sum(a=1, b=2) {...}`.
|
||||
- Parameters can have default values: `function sum(a = 1, b = 2) {...}`.
|
||||
- Functions always return something. If there's no `return` statement, then the result is `undefined`.
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue