File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 2323 " insert('function isAda() {\n // write condition here\n // return true if student name\n // matches \" Ada Lovelace\"\n\n }\n ')"
2424 ],
2525 "hints" : [
26- " Click here to get hints" ,
26+ " Some tasks have hints" ,
2727 " Pass in a parameter to `isAda`, let's call it \" student\" " ,
28- " Check if `student.name` matches \" Ada Lovelace\" "
28+ " Check if `student.name` matches \" Ada Lovelace\" " ,
29+ " Use `===` to check equality"
2930 ]
3031 },
3132 {
3536 ],
3637 "actions" : [
3738 " insert('// call filter condition here\n var myData = data.filter();\n ')"
39+ ],
40+ "hints" : [
41+ " Array.filter(function() {})" ,
42+ " Pass `isAda` into your `filter` call"
3843 ]
3944 },
4045 {
4449 ],
4550 "actions" : [
4651 " insert('\n\n // return true if student.grade is not a \" D\" or \" F\"\n function isGoodGrade(student) {\n\n }\n ')"
52+ ],
53+ "hints" : [
54+ " match for `student.grade` that isn\\ 't \" D\" or \" F\" " ,
55+ " use `!==` to check non-equality" ,
56+ " student.grade !== \" D\" && student.grade !== \" F\" "
4757 ]
4858 },
4959 {
Original file line number Diff line number Diff line change 2525 "dependencies" : {
2626 "chai" : " 3.5.0" ,
2727 "chai-spies" : " 0.7.1" ,
28- "lodash" : " 4.5.0 " ,
28+ "lodash" : " 4.5.1 " ,
2929 "mocha" : " 2.4.5" ,
3030 "mocha-coderoad" : " ^0.4.2"
3131 },
Original file line number Diff line number Diff line change @@ -80,9 +80,10 @@ function isAda() {
8080}
8181```
8282))
83- @hint ('Click here to get hints')
83+ @hint ('Some tasks have hints')
8484@hint ('Pass in a parameter to ` isAda ` , let's call it "student"')
8585@hint ('Check if ` student.name ` matches "Ada Lovelace"')
86+ @hint ('Use ` === ` to check equality')
8687
8788+ Set ` var myData ` equal to data matching your name, "Ada Lovelace".
8889@test ('1/01/02-filter')
@@ -92,6 +93,8 @@ function isAda() {
9293var myData = data.filter();
9394```
9495))
96+ @hint ('` Array.filter(function() {}) ` ')
97+ @hint ('Pass ` isAda ` into your ` filter ` call')
9598
9699+ Write a filter condition called ` isGoodGrade ` that will filter out any "D" or "F" grades.
97100@test ('1/01/03-filter')
@@ -105,6 +108,9 @@ function isGoodGrade(student) {
105108}
106109```
107110))
111+ @hint ('match for ` student.grade ` that isn\' t "D" or "F"')
112+ @hint ('use ` !== ` to check non-equality')
113+ @hint ('` student.grade !== "D" && student.grade !== "F" ` ')
108114
109115+ Set ` var myBest ` to your scores, excluding any grades that are "D" or "F".
110116
You can’t perform that action at this time.
0 commit comments