scrimba
Note at 1:07
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Note at 1:07
AboutCommentsNotes
Note at 1:07
Expand for more info
main.js
run
preview
console
const candies = (children, candy) => Math.floor(candy / children) * children;

/**
* Test Suite
*/
describe('candies()', () => {
it('returns ammount of total equal candy to be eaten', () => {
// arrange
const children = 3;
const candy = 10;

// act
const result = candies(children, candy);

// log
console.log("result: ", result);

// assert
expect(result).toBe(9);
});
});
Console
/403.html
LIVE