forked from joinpursuit/8-0-javascript-on-your-machine-lab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
10 lines (9 loc) · 648 Bytes
/
Copy pathindex.js
File metadata and controls
10 lines (9 loc) · 648 Bytes
1
2
3
4
5
6
7
8
9
10
/**
* The function below has no parameters. Instead, access the arguments from the command line.
* The first argument passed after the filename should be either "plus" or "minus", which represents the kind of calculation that will be done. Every argument afterwards should be a number.
* Depending on the operation, either add up all of the numbers or subtract all of the numbers, from left to right.
* @returns {number} The result of either adding all numbers or subtracting all numbers, depending on the arguments added to the command line.
*/
function calculator() {}
// Don't change anything below this line.
module.exports = calculator;