freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/rosetta-code/department-numbers.arabic.md

1.2 KiB

title id challengeType videoUrl localeTitle
Department Numbers 59f40b17e79dbf1ab720ed7a 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(typeof combinations === "function", "<code>combinations</code> should be a function.");'
  - text: ''
    testString: 'assert(Array.isArray(combinations([1, 2, 3], 6)), "<code>combinations([1, 2, 3], 6)</code> should return an Array.");'
  - text: ''
    testString: 'assert(combinations(nums, total).length === len, "<code>combinations([1, 2, 3, 4, 5, 6, 7], 12)</code> should return an array of length 14.");'
  - text: ''
    testString: 'assert.deepEqual(combinations(nums, total), result, "<code>combinations([1, 2, 3, 4, 5, 6, 7], 12)</code> should return all valid combinations.");'

Challenge Seed

function combinations (possibleNumbers, total) {
  // Good luck!
  return true;
}

After Test

console.info('after the test');

Solution

// solution required