Skip to content

Commit 29b64e5

Browse files
erikdjpowers
authored andcommitted
Grammar tweaks
1 parent 0c744e5 commit 29b64e5

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

chapters/ajax/ajax_request_without_jquery.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Let's set up a simple test HTML page with a button.
2323
<body>
2424
<h1>XMLHttpRequest Tester</h1>
2525
<button id="loadDataButton">Load Data</button>
26-
26+
2727
<script type="text/javascript" src="XMLHttpRequest.js"></script>
2828
</body>
2929
</html>
@@ -53,7 +53,7 @@ loadDataFromServer = ->
5353
console.log 'data message: ', data.message
5454
else
5555
console.log 'Error loading data...'
56-
56+
5757
req.open 'GET', 'data.json', false
5858
req.send()
5959

@@ -63,7 +63,7 @@ loadDataButton.addEventListener 'click', loadDataFromServer, false
6363

6464
## Discussion
6565

66-
In the above code we essentially grab a handle to the button in our HTML (line 16) and add a *click* event listener (line 17). In our event listener, we define our callback function as loadDataFromServer.
66+
In the above code we grab a handle to the button in our HTML (line 16) and add a *click* event listener (line 17). In our event listener, we define our callback function as loadDataFromServer.
6767

6868
We define our loadDataFromServer callback beginning on line 2.
6969

@@ -77,7 +77,7 @@ The last thing we need to do is actually make our request.
7777

7878
Line 13 opens a 'GET' request to retrieve the data.json file.
7979

80-
Line 14 sends our request to the server.
80+
Line 14 sends our request to the server.
8181

8282
## Older Browser Support
8383

@@ -100,4 +100,3 @@ if (typeof @XMLHttpRequest == "undefined")
100100
{% endhighlight %}
101101

102102
This code ensures the XMLHttpRequest object is available in the global namespace.
103-

chapters/arrays/define-ranges.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ There are two ways to define a range of array elements in CoffeeScript.
1313

1414
{% highlight coffeescript %}
1515

16+
# inclusive
1617
myArray = [1..10]
1718
# => [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ]
1819

1920
{% endhighlight %}
2021

2122
{% highlight coffeescript %}
2223

24+
# exclusive
2325
myArray = [1...10]
2426
# => [ 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
2527

@@ -42,6 +44,7 @@ myLargeArray = [10...1]
4244

4345
## Discussion
4446

45-
Inclusive range always define by '..' operator.
47+
Inclusive ranges are defined by the '..' operator and include the last value.
48+
49+
Exclusive ranges are defined by '...', and always omit the last value.
4650

47-
Exclusive range define by '...', and always omit the last value.

0 commit comments

Comments
 (0)