diff --git a/lessons/03-express-templates/catApp/app.js b/lessons/03-express-templates/catApp/app.js index e7c14d33..10c2b992 100644 --- a/lessons/03-express-templates/catApp/app.js +++ b/lessons/03-express-templates/catApp/app.js @@ -25,3 +25,5 @@ app.get('/cats/bycolor/:color',index.bycolor); app.get('/cats/delete/old', index.deleteOldCat); app.listen(3000); + +// It would be nice to have a few comments here, maybe for each section. \ No newline at end of file diff --git a/lessons/03-express-templates/catApp/feedback.txt b/lessons/03-express-templates/catApp/feedback.txt new file mode 100644 index 00000000..4f48d164 --- /dev/null +++ b/lessons/03-express-templates/catApp/feedback.txt @@ -0,0 +1,34 @@ +Do not merge this branch! + +**Homework Feedback for Cat App** + +The link you sent in the homework survey did not exist anymore, so I went back in your commit history to find your original cat app. In the commit I am looking at there are a lot of old/extra files you would want to remove, but I'm assuming you did this later after this commit. (Your "move cat app" commit appeared to removed the cat app instead of moving it.) + + +Functionality: + +All tasks completed!* Awesome job, and your app appears to be bug free. :D +*Second submission + + +Completion: (20/20) + +Bug Free: (10/10) + + + +Quality: + +Your code was well organized and commented! It was very clear and readable. +Citing references when you took code from online was great. A good next step would be adding comments describing your functions for the functions you did not do this for. + + + +Good Coding Practices: (10/10) + +Readability: (9/10) + + +Summary: Nice work! Everything is functional and you followed good practices. + +(49/50) diff --git a/lessons/03-express-templates/catApp/routes/index.js b/lessons/03-express-templates/catApp/routes/index.js index 26b7ecaf..79946884 100644 --- a/lessons/03-express-templates/catApp/routes/index.js +++ b/lessons/03-express-templates/catApp/routes/index.js @@ -15,7 +15,7 @@ function Cat(){ var cat = { name: names[Math.floor(Math.random()*names.length)], color: [colors[Math.floor(Math.random()*colors.length)],colors[Math.floor(Math.random()*colors.length)]], - age: Math.floor(Math.random() * 1001) + age: Math.floor(Math.random() * 1001) // These are old cats. }; return cat; } @@ -36,6 +36,7 @@ var newCat = function(req, res) { var cats = function(req, res) { allCats = db.getAll(); // adapted from http://stackoverflow.com/questions/1069666/sorting-javascript-object-by-property-value + // Awesome citing your references!!!!! allCats.sort(function(a, b) { return a.age - b.age; });