Skip to content

Commit

Merge #3: Add multiply to math.js

g1tbotcommitted Parents6dd94ca63a1766Browse files
2 files+6−20/2 viewed
+5−1
33 return a + b;
44 }
55
6−module.exports = { add };
6+function multiply(a, b) {
7+ return a * b;
8+}
9+
10+module.exports = { add, multiply };
+1−1
22 const math = require("./math");
33
44 assert.strictEqual(math.add(2, 3), 5);
5−if (math.multiply) assert.strictEqual(math.multiply(4, 5), 20);
5+assert.strictEqual(math.multiply(4, 5), 20);
66 console.log("all tests passed");

Comments

Sign in to comment.