1.1 KiB
1.1 KiB
title | id | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
Evaluate binomial coefficients | 598de241872ef8353c58a7a2 | 5 |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert(typeof binom === "function", "<code>binom</code> is a function.");'
- text: ''
testString: 'assert.equal(binom(5, 3), 10, "<code>binom(5,3)</code> should return 10.");'
- text: ''
testString: 'assert.equal(binom(7, 2), 21, "<code>binom(7,2)</code> should return 21.");'
- text: ''
testString: 'assert.equal(binom(10, 4), 210, "<code>binom(10,4)</code> should return 210.");'
- text: ''
testString: 'assert.equal(binom(6, 1), 6, "<code>binom(6,1)</code> should return 6.");'
- text: ''
testString: 'assert.equal(binom(12, 8), 495, "<code>binom(12,8)</code> should return 495.");'
Challenge Seed
function binom (n, k) {
// Good luck!
}
Solution
// solution required