Clone your repository: hub clone function-junction
Change into your project's directory: cd function-junction
Install the dependencies: yarn install (or just yarn for short)
Open in Code: code .
Start the test runner: yarn test
Open src/functions.test.js and work on functions until tests pass.
Commit and push your work to GitHub.
Turn in the URL to your GitHub repo.
Explorer Mode
[x] All tests passing
[x] No linter warnings
[x] Turn in the homework using the URL to your repository on Github.
Adventure Mode
[ ] If you used "built-in" JavaScript methods like String.reverse() or Array.max() to solve these problems, try implementing them from scratch.
[ ] Vice-versa: if you implemented your solutions from scratch, look in the documentation linked below to see if JavaScript has any built-in functions to help solve these problems.
Epic Mode
[ ] Expand the sum and max functions to take arrays instead of numbers and update the tests so they pass.
[ ] Create your own simple functions with tests.
[ ] Anytime in your code that you used a for loop or a while loop, convert it to use a map, filter or reduce.
Additional Resources
Reference the documentation on MDN to find what kind of helpful functions might already be on Array and String in JavaScript.
Objectives
After completing this assignment, you should be able to:
Requirements
hub clone function-junction
cd function-junction
yarn install
(or justyarn
for short)code .
yarn test
src/functions.test.js
and work on functions until tests pass.Explorer Mode
Adventure Mode
String.reverse()
orArray.max()
to solve these problems, try implementing them from scratch.Epic Mode
sum
andmax
functions to take arrays instead of numbers and update the tests so they pass.for
loop or awhile
loop, convert it to use amap
,filter
orreduce
.Additional Resources
Reference the documentation on MDN to find what kind of helpful functions might already be on
Array
andString
in JavaScript.