Open cyouh95 opened 5 years ago
When I run node test/test-all.js
, all tests pass. So I'm not sure what you mean when you say that most tests pass.
@katedobroth Ah, there seems to be a small discrepancy in the test suite on the Codecademy platform and the one in the project zip folder that you can download on the project page. Thank you for pointing that out - I will pass that along to the content team!
But here is the project folder you can download from the course page, which contains a couple additional tests for the inRange()
method. As noted from the instructions in Step 7, we'd want the inRange()
method to return false
if "the provided number is smaller than the start value", and true
if it is equal to or greater than. Thus, we would want start <= number
on this line here.
Nonetheless, excellent work overall on this project! Let us know if you have any additional questions or concerns.
Criteria 1: Functionality
Comment(s): Most functionality is properly implemented, identified by most tests in the testing suite passing. Great job! (Note: You could run the test suite by running
node test/test-all.js
in your terminal.)Only small thing to note is we would want
start <= number
here, since theinRange()
method should also returntrue
ifnumber
equalsstart
.Criteria 2: Formatting
Criteria 3: JavaScript Techniques
Overall Score: 10/12
Great job on this project! Code is overall very well-written and formatted. Great use of loops, control flow statements, as well as all-around adhering to DRY principles. Most methods passes all the tests in the provided test suite, so well done!
There are just a few places where you could simplify/condense your code further. For example, here, it may be a good idea to use the ternary operator:
We may also want to specifically check if
n
isundefined
because ifn
is0
, it would be considered "falsey" as well.For your
chunk()
method here, you could also consider using the.push()
method to dynamically add to your array:But otherwise, great work overall on this!
As a further challenge, feel free to try implementing more functions from the lodash library and perhaps write your own tests to check them. Have fun! :)