1.1 KiB
1.1 KiB
id | title | challengeType | videoUrl | localeTitle |
---|---|---|---|---|
a3f503de51cfab748ff001aa | Pairwise | 5 |
Description
undefined
Instructions
undefined
Tests
tests:
- text: ''
testString: 'assert.deepEqual(pairwise([1, 4, 2, 3, 0, 5], 7), 11, "<code>pairwise([1, 4, 2, 3, 0, 5], 7)</code> should return 11.");'
- text: ''
testString: 'assert.deepEqual(pairwise([1, 3, 2, 4], 4), 1, "<code>pairwise([1, 3, 2, 4], 4)</code> should return 1.");'
- text: ''
testString: 'assert.deepEqual(pairwise([1, 1, 1], 2), 1, "<code>pairwise([1, 1, 1], 2)</code> should return 1.");'
- text: ''
testString: 'assert.deepEqual(pairwise([0, 0, 0, 0, 1, 1], 1), 10, "<code>pairwise([0, 0, 0, 0, 1, 1], 1)</code> should return 10.");'
- text: ''
testString: 'assert.deepEqual(pairwise([], 100), 0, "<code>pairwise([], 100)</code> should return 0.");'
Challenge Seed
function pairwise(arr, arg) {
return arg;
}
pairwise([1,4,2,3,0,5], 7);
Solution
// solution required