freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/rosetta-code/factors-of-an-integer.arabi...

1.0 KiB

title id challengeType videoUrl localeTitle
Factors of an integer 597f1e7fbc206f0e9ba95dc4 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(typeof factors === "function", "<code>factors</code> is a function.");'
  - text: ''
    testString: 'assert.deepEqual(factors(45), ans[0], "<code>factors(45)</code> should return <code>[1,3,5,9,15,45]</code>.");'
  - text: ''
    testString: 'assert.deepEqual(factors(53), ans[1], "<code>factors(53)</code> should return <code>[1,53]</code>.");'
  - text: ''
    testString: 'assert.deepEqual(factors(64), ans[2], "<code>factors(64)</code> should return <code>[1,2,4,8,16,32,64]</code>.");'

Challenge Seed

function factors (num) {
  // Good luck!
}

After Test

console.info('after the test');

Solution

// solution required