From 038230240b1e7271a392ec6f3f55be29d5684967 Mon Sep 17 00:00:00 2001
From: Markus Amalthea Magnuson
Date: Thu, 14 Mar 2013 20:16:05 +0100
Subject: [PATCH 1/3] Remove trailing whitespace.
---
page/javascript-101.md | 2 +-
page/javascript-101/arrays.md | 6 +++---
page/javascript-101/closures.md | 8 ++++----
page/javascript-101/conditional-code.md | 2 +-
page/javascript-101/functions.md | 2 +-
page/javascript-101/getting-started.md | 8 ++++----
page/javascript-101/loops.md | 2 +-
page/javascript-101/objects.md | 2 +-
page/javascript-101/operators.md | 2 +-
page/javascript-101/running-code.md | 11 ++---------
page/javascript-101/testing-type.md | 2 +-
page/javascript-101/this-keyword.md | 2 +-
page/javascript-101/types.md | 6 +++---
13 files changed, 24 insertions(+), 31 deletions(-)
diff --git a/page/javascript-101.md b/page/javascript-101.md
index a74874b7..abcbc30b 100644
--- a/page/javascript-101.md
+++ b/page/javascript-101.md
@@ -2,7 +2,7 @@
title : JavaScript 101
level: beginner
source: http://jqfundamentals.com/legacy
-attribution:
+attribution:
- jQuery Fundamentals
customFields:
-
diff --git a/page/javascript-101/arrays.md b/page/javascript-101/arrays.md
index 507c62cb..9903b870 100644
--- a/page/javascript-101/arrays.md
+++ b/page/javascript-101/arrays.md
@@ -2,7 +2,7 @@
title: Arrays
level: beginner
source: http://jqfundamentals.com/legacy
-attribution:
+attribution:
- jQuery Fundamentals
---
Arrays are zero-indexed, ordered lists of values. They are a handy way to store a set of related items of the same type (such as strings), though in reality, an array can include multiple types of items, including other arrays.
@@ -11,9 +11,9 @@ To create an array, either use the object constructor or the literal declaration
```
// A simple array with constructor
-var myArray1 = new Array( "hello", "world" );
+var myArray1 = new Array( "hello", "world" );
// literal declaration, the preferred way
-var myArray2 = [ "hello", "world" ];
+var myArray2 = [ "hello", "world" ];
```
The literal declaration is generally preferred. See the [Google Coding Guidelines](http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml#Array_and_Object_literals) for more information.
diff --git a/page/javascript-101/closures.md b/page/javascript-101/closures.md
index 00891849..1c929127 100644
--- a/page/javascript-101/closures.md
+++ b/page/javascript-101/closures.md
@@ -2,7 +2,7 @@
title: Closures
level: beginner
source: http://jqfundamentals.com/legacy
-attribution:
+attribution:
- jQuery Fundamentals
---
@@ -11,7 +11,7 @@ Closures are an extension of the concept of scope. With closures, functions have
As shown in the [Functions](/functions) section, functions have access to changing variable values. The same sort of behavior exists with functions defined within loops — the function "sees" the change in the variable's value even after the function is defined, resulting in each function referencing the last value stored in the variable.
```
-// Each function executed within the loop will reference
+// Each function executed within the loop will reference
// the last value stored in i (5).
// this won't behave as we want it to -
// every 100 milliseconds, 5 will alert
@@ -78,7 +78,7 @@ outerObj.outerFunction();
```
## `Function.bind`
-Closures can be particularly useful when dealing with callbacks. However, it is often better to use `Function.bind`, which will avoid any overhead associated with scope traversal.
+Closures can be particularly useful when dealing with callbacks. However, it is often better to use `Function.bind`, which will avoid any overhead associated with scope traversal.
`Function.bind` is used to create a new function. When called, the new function then calls itself in the context of the supplied `this` value, using a given set of arguments that will precede any arguments provided when the new function was initially called.
@@ -138,7 +138,7 @@ var module = {
};
-// module.getUser() is called where "module" is "this"
+// module.getUser() is called where "module" is "this"
// and "module.user" is returned.
// janedoe
diff --git a/page/javascript-101/conditional-code.md b/page/javascript-101/conditional-code.md
index bc336843..12bb7022 100644
--- a/page/javascript-101/conditional-code.md
+++ b/page/javascript-101/conditional-code.md
@@ -2,7 +2,7 @@
title: Conditional Code
level: beginner
source: http://jqfundamentals.com/legacy
-attribution:
+attribution:
- jQuery Fundamentals
---
Sometimes a block of code should only be run under certain conditions. Flow control — via `if` and `else` blocks — lets you run code if certain conditions have been met.
diff --git a/page/javascript-101/functions.md b/page/javascript-101/functions.md
index 96d75b6b..aec58bd0 100644
--- a/page/javascript-101/functions.md
+++ b/page/javascript-101/functions.md
@@ -2,7 +2,7 @@
title: Functions
level: beginner
source: http://jqfundamentals.com/legacy
-attribution:
+attribution:
- jQuery Fundamentals
---
diff --git a/page/javascript-101/getting-started.md b/page/javascript-101/getting-started.md
index b760799a..217ae429 100644
--- a/page/javascript-101/getting-started.md
+++ b/page/javascript-101/getting-started.md
@@ -2,7 +2,7 @@
title: Getting Started
level: Beginner
source: http://jqfundamentals.com/legacy
-attribution:
+attribution:
- jQuery Fundamentals
---
@@ -38,10 +38,10 @@ Look at this simple HTML page that includes CSS and JavaScript to see how it all