Change into your project's directory: cd unit-i-katas
Install the dependencies: yarn install (or just yarn for short)
Open in Code: code .
Start the test runner: yarn start
Feel free to split screen your work, except now you should split-screen your editor and your TERMINAL
In your editor, open src/functions.test.js and work on each function until the test pass.
Each time you save your code, the tests run and tell you if your code is correct.
Commit and push your work to GitHub.
Turn in the URL to your GitHub repo.
Explorer Mode
[ ] All tests passing
[ ] No linter warnings
[ ] 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.
unit i katas
Objectives
After completing this assignment, you should be able to:
Requirements
hub clone unit-i-katas
cd unit-i-katas
yarn install
(or justyarn
for short)code .
yarn start
src/functions.test.js
and work on each function until the test 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.