Note: This document is a work in progress. You can help improve it.
After completing this assignment, you should be able to:
- Demonstrate understanding of types, functions, argument-handling, loops, and conditional statements
- Fork this repository to your own account.
- Change into your training directory
- Clone your repository:
hub clone function-junction
- Change into your project's directory:
- Install the dependencies:
yarn install(or just
- Open in Code:
- Start the test runner:
- 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.jsand 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.
- All tests passing
- No linter warnings
- Turn in the homework using the URL to your repository on Github.
- CAUTION One the test is broken. Your job is to update the test to pass.
Array.max()to solve these problems, try implementing them from scratch.
- Expand the
maxfunctions 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
forloop or a
whileloop, convert it to use a
Reference the documentation on MDN to find what kind of helpful functions might already be on