Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

Commit 146ec6f

Browse files
committed
Merge pull request #2 from butlermatt/master
update number conversions
2 parents e50f72e + 5976f21 commit 146ec6f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/site/_includes/language-tour/3-built-in-types/lists.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ <h4> List and Collection methods </h4>
120120
returns a new collection with only the elements that satisfy a condition.
121121
The <a href="http://api.dartlang.org/dart_core/Collection.html#every">every()</a> and
122122
<a href="http://api.dartlang.org/dart_core/Collection.html#some">some()</a> methods
123-
check whether a collection matches
124-
every condition or at least one condition, respectively.
123+
check whether every item in a collection matches a condition
124+
or if at least one item matches a condition, respectively.
125125
The <a href="http://api.dartlang.org/dart_core/List.html#sort">sort()</a> method
126126
lets you sort a list using any criteria you like.
127127
</p>

src/site/_includes/language-tour/3-built-in-types/numbers.html

+5-3
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,14 @@
5757
</p>
5858

5959
{% highlight dart %}
60+
#import('dart:math'); // Needed for math functions. See libraries section
61+
6062
// String -> int
61-
var one = Math.parseInt("1");
63+
var one = parseInt("1");
6264
assert(one == 1);
6365

6466
// String -> double
65-
var onePointOne = Math.parseDouble("1.1");
67+
var onePointOne = parseDouble("1.1");
6668
assert(onePointOne == 1.1);
6769

6870
// int -> String
@@ -80,7 +82,7 @@
8082
</p>
8183

8284
{% highlight dart %}
83-
assert((3 < 1) == 6); // 0011 << 1 == 0110
85+
assert((3 << 1) == 6); // 0011 << 1 == 0110
8486
assert((3 >> 1) == 1); // 0011 >> 1 == 0001
8587
assert((3 | 4) == 7); // 0011 | 0100 == 0111
8688
{% endhighlight %}

0 commit comments

Comments
 (0)