Fixed ) { vs ){ inconsistency

This commit is contained in:
Adam Brenecki 2014-01-19 16:10:58 +10:30
parent 11f860fce6
commit c43c033646

View File

@ -175,14 +175,14 @@ myObj.myFourthKey; // = undefined
var count = 1; var count = 1;
if (count == 3){ if (count == 3){
// evaluated if count is 3 // evaluated if count is 3
} else if (count == 4) { } else if (count == 4){
// evaluated if count is 4 // evaluated if count is 4
} else { } else {
// evaluated if it's not either 3 or 4 // evaluated if it's not either 3 or 4
} }
// As does while. // As does while.
while (true) { while (true){
// An infinite loop! // An infinite loop!
} }
@ -327,7 +327,7 @@ var anotherFunc = function(s){
} }
anotherFunc.call(myObj, " And Hello Moon!"); // = "Hello World! And Hello Moon!" anotherFunc.call(myObj, " And Hello Moon!"); // = "Hello World! And Hello Moon!"
// The 'apply' function is nearly identical, but takes an array for an argument list. // The 'apply' function is nearly identical, but takes an array for an argument list.
anotherFunc.apply(myObj, [" And Hello Sun!"]); // = "Hello World! And Hello Sun!" anotherFunc.apply(myObj, [" And Hello Sun!"]); // = "Hello World! And Hello Sun!"