freeCodeCamp/curriculum/challenges/arabic/08-coding-interview-prep/rosetta-code/harshad-or-niven-series.ara...

1022 B

title id challengeType videoUrl localeTitle
Harshad or Niven series 595668ca4cfe1af2fb9818d4 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert(typeof isHarshadOrNiven === "function", "<code>isHarshadOrNiven</code> is a function.");'
  - text: ''
    testString: 'assert.deepEqual(isHarshadOrNiven(), res, "<code>isHarshadOrNiven()</code> should return <code>{"firstTwenty": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 18, 20, 21, 24, 27, 30, 36, 40, 42],"firstOver1000": 1002}</code>");'

Challenge Seed

function isHarshadOrNiven () {
  const res = {
    firstTwenty: [],
    firstOver1000: undefined
  };
  // Change after this line

  return res;
}

After Test

console.info('after the test');

Solution

// solution required