Today we talked about functions in JavaScript -- code blocks that can be executed on-demand, which accept parameters and perform tasks on or with them.
After completing this assignment, you should...
- Understand JavaScript functions - definition, invocation, parameters, and returns
- Understand the principle of DRY
- Be comfortable with a standard TDD workflow
- Have practiced some algorithmic thinking
After completing this assignment, you should be able to effectively use:
- JavaScript functions
- Test-Driven development
- node.js and Express to run a simple web server
This assignment consists of a simple test runner that's performing tests on functions that we need to complete.
Complete the six functions in public/max.js
, public/power.js
, and public/vowel.js
so that all tests (which are defined in the public/test
folder) pass.
The first function in each file should be somewhat straightforward. The second function in each file must utilize the first function.
Note: Please create a git commit after every function's tests are passing for the first time.
Write up another two-tiered set of functions, and write a similar suite of tests for them.