freeCodeCamp/curriculum/challenges/arabic/02-javascript-algorithms-an.../intermediate-algorithm-scri.../smallest-common-multiple.ar...

1.3 KiB

id title isRequired challengeType videoUrl localeTitle
ae9defd7acaf69703ab432ea Smallest Common Multiple true 5

Description

undefined

Instructions

undefined

Tests

tests:
  - text: ''
    testString: 'assert.deepEqual(typeof smallestCommons([1, 5]), "number", "<code>smallestCommons([1, 5])</code> should return a number.");'
  - text: ''
    testString: 'assert.deepEqual(smallestCommons([1, 5]), 60, "<code>smallestCommons([1, 5])</code> should return 60.");'
  - text: ''
    testString: 'assert.deepEqual(smallestCommons([5, 1]), 60, "<code>smallestCommons([5, 1])</code> should return 60.");'
  - text: ''
    testString: 'assert.deepEqual(smallestCommons([2, 10]), 2520, "<code>smallestCommons([2, 10])</code> should return 2520.");'
  - text: ''
    testString: 'assert.deepEqual(smallestCommons([1, 13]), 360360, "<code>smallestCommons([1, 13])</code> should return 360360.");'
  - text: ''
    testString: 'assert.deepEqual(smallestCommons([23, 18]), 6056820, "<code>smallestCommons([23, 18])</code> should return 6056820.");'

Challenge Seed

function smallestCommons(arr) {
  return arr;
}


smallestCommons([1,5]);

Solution

// solution required