Skip to content

Commit 4dcaf38

Browse files
committed
onPageComplete statements
1 parent 0bf6653 commit 4dcaf38

File tree

9 files changed

+25
-28
lines changed

9 files changed

+25
-28
lines changed

coderoad.json

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
]
6767
}
6868
],
69-
"onPageComplete": "In the next unit we'll look at how to `sort` data"
69+
"onPageComplete": "In the next step we'll look at how to `sort` data"
7070
},
7171
{
7272
"title": "Sort",
@@ -113,7 +113,7 @@
113113
]
114114
}
115115
],
116-
"onPageComplete": "In the next unit we'll look at changing data with `map`"
116+
"onPageComplete": "In the next step we'll look at changing data with `map`"
117117
},
118118
{
119119
"title": "Map",
@@ -195,7 +195,8 @@
195195
"return `{ score: student.score, grade: student.grade }`"
196196
]
197197
}
198-
]
198+
],
199+
"onPageComplete": "In the next step we'll compare `map` with `forEach`"
199200
},
200201
{
201202
"title": "forEach",
@@ -241,15 +242,16 @@
241242
]
242243
},
243244
{
244-
"description": "What??? Suddenly Your data has all disappeared!\n\nIt seems `myFixed` relies on a chain of methods.\n\n```js\nmyFixed = students\n .filter(isAda)\n .sort(compareScore)\n .map(increaseScore)\n .map(getGrade)\n .forEach(logCourseWithIndexAndArray)\n```\n\nThis is why side-effects are dangerous. Students data must have changed, and now all of your transformations are effected.\n\nSomething strange is going on. In the next step we'll try to `find` your data.",
245+
"description": "What??? Suddenly Your data has all disappeared!\n\nIt seems `myFixed` relies on a chain of methods.\n\n```js\nmyFixed = students\n .filter(isAda)\n .sort(compareScore)\n .map(increaseScore)\n .map(getGrade)\n .forEach(logCourseWithIndexAndArray)\n```\n\nThis is why side-effects are dangerous. Students data must have changed, and now all of your transformations are effected.",
245246
"tests": [
246247
"1/04/04-forEach"
247248
],
248249
"actions": [
249250
"insert('\nconsole.log(myFixed);\n')"
250251
]
251252
}
252-
]
253+
],
254+
"onPageComplete": "Something strange is going on. In the next step we'll try to `find` your data."
253255
},
254256
{
255257
"title": "find",
@@ -319,14 +321,9 @@
319321
"hints": [
320322
"call `join` following `unknownStudentNames`"
321323
]
322-
},
323-
{
324-
"description": "Very strange. In the next step, let's find out who wants revenge, and give it to him!",
325-
"tests": [
326-
"1/05/06-find"
327-
]
328324
}
329-
]
325+
],
326+
"onPageComplete": "Very strange. In the next step, let's find out who wants revenge, and give it to him!"
330327
},
331328
{
332329
"title": "concat",
@@ -389,7 +386,8 @@
389386
"call `suspects.concat()` with `newSuspects`"
390387
]
391388
}
392-
]
389+
],
390+
"onPageComplete": "In the next step, we'll look at using one of the most powerful methods: `reduce`"
393391
},
394392
{
395393
"title": "reduce",
@@ -486,4 +484,4 @@
486484
]
487485
}
488486
]
489-
}
487+
}

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{
22
"name": "coderoad-functional-school",
3-
"version": "0.1.8",
3+
"version": "0.1.9",
44
"description": "Coderoad tutorial",
55
"author": "Shawn McKay <shawn.j.mckay@gmail.com> (http://shmck.com)",
6-
"contributers": [],
6+
"contributers": [
7+
"dimchez"
8+
],
79
"keywords": [
810
"coderoad", "tutorial", "functional"
911
],

tutorial/1/01/filter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,4 @@ var myBest = myData.filter();
123123
```
124124
))
125125

126-
@onPageComplete('In the next unit we'll look at how to `sort` data')
126+
@onPageComplete('In the next step we'll look at how to `sort` data')

tutorial/1/02/sort.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ var mySorted = myBest
7070
))
7171
@hint('try using `myBest.sort()`')
7272

73-
@onPageComplete('In the next unit we'll look at changing data with `map`')
73+
@onPageComplete('In the next step we'll look at changing data with `map`')

tutorial/1/03/map.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,5 @@ var scoresAndGrades = myFixed;
149149
@hint('use `map` to return only the "score" & "grade" fields')
150150
@hint('map with a function with a parameter, call it "student"')
151151
@hint('return `{ score: student.score, grade: student.grade }`')
152+
153+
@onPageComplete('In the next step we'll compare `map` with `forEach`')

tutorial/1/04/forEach.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,12 @@ myFixed = students
150150

151151
This is why side-effects are dangerous. Students data must have changed, and now all of your transformations are effected.
152152

153-
Something strange is going on. In the next step we'll try to `find` your data.
154153
@test('1/04/04-forEach')
155154
@action(insert(
156155
```
157156
158157
console.log(myFixed);
159158
```
160159
))
160+
161+
@onPageComplete('Something strange is going on. In the next step we'll try to `find` your data.')

tutorial/1/05/06-find.spec.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

tutorial/1/05/find.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,4 @@ console.log(decodedName);
9696
))
9797
@hint('call `join` following `unknownStudentNames`')
9898

99-
+ Very strange. In the next step, let's find out who wants revenge, and give it to him!
100-
@test('1/05/06-find')
99+
@onPageComplete('Very strange. In the next step, let's find out who wants revenge, and give it to him!')

tutorial/1/06/concat.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,5 @@ var newSuspects = ['Albert Gonzalez', 'Kevin Mitnick'];
183183
`concat` the `newSuspects` onto the `suspects` list.
184184
@test('1/06/05-concat')
185185
@hint('call `suspects.concat()` with `newSuspects`')
186+
187+
@onPageComplete('In the next step, we'll look at using one of the most powerful methods: `reduce`')

0 commit comments

Comments
 (0)