From 9697b434f7a3d354f42b28b9b1b848aafe158299 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 4 May 2020 16:44:41 +0200 Subject: [PATCH] find_lcm.js: Standardjs fixes --- maths/find_lcm.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/maths/find_lcm.js b/maths/find_lcm.js index 305aea32a5..3d4d0e8a6a 100644 --- a/maths/find_lcm.js +++ b/maths/find_lcm.js @@ -13,21 +13,21 @@ // Find the LCM of two numbers. function findLcm (num1, num2) { - var max_num + var maxNum var lcm // Check to see whether num1 or num2 is larger. if (num1 > num2) { - max_num = num1 + maxNum = num1 } else { - max_num = num2 + maxNum = num2 } - lcm = max_num + lcm = maxNum while (true) { if ((lcm % num1 === 0) && (lcm % num2 === 0)) { break } - lcm += max_num + lcm += maxNum } return lcm }