Skip to content
9 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

Add math helpers, tests and checks1const assert = require("node:assert");
2const math = require("./math");
3
4assert.strictEqual(math.add(2, 3), 5);
Merge #3: Add multiply to math.js5assert.strictEqual(math.multiply(4, 5), 20);
Add power function to math.js6assert.strictEqual(math.power(2, 10), 1024);
7assert.strictEqual(math.power(5, 0), 1);
8assert.throws(() => math.power(2, -1), RangeError);
Add math helpers, tests and checks9console.log("all tests passed");

This file's history is long; its oldest lines are credited to the oldest commit read.