From 54e56b32fc1992acd62ea6810bb0c1a4e2889083 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Sat, 23 Dec 2017 10:07:07 +0000 Subject: [PATCH] Travis build: 182 --- README.md | 2 +- docs/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8556ec300..d6a3ffe4b 100644 --- a/README.md +++ b/README.md @@ -290,7 +290,7 @@ Use `Array.reduce()` and the `lcm` formula (uses recursion) to calculate the low ```js const arrayLcm = arr =>{ const gcd = (x, y) => !y ? x : gcd(y, x % y); - const lcm = (x, y) => (x*y)/gcd(x, y) + const lcm = (x, y) => (x*y)/gcd(x, y); return arr.reduce((a,b) => lcm(a,b)); } // arrayLcm([1,2,3,4,5]) -> 60 diff --git a/docs/index.html b/docs/index.html index 0c1ea6384..b02eda175 100644 --- a/docs/index.html +++ b/docs/index.html @@ -270,7 +270,7 @@ arrayMax([1,2,4]) // -> 4

Use Array.reduce() and the lcm formula (uses recursion) to calculate the lowest common multiple of an array of numbers.

const arrayLcm = arr =>{
   const gcd = (x, y) => !y ? x : gcd(y, x % y);
-  const lcm = (x, y) => (x*y)/gcd(x, y) 
+  const lcm = (x, y) => (x*y)/gcd(x, y); 
   return arr.reduce((a,b) => lcm(a,b));
 }
 // arrayLcm([1,2,3,4,5]) -> 60