From 66600374beddbaf41dda679f11ab2790137a6ef2 Mon Sep 17 00:00:00 2001 From: PatOnTheBack <51241310+PatOnTheBack@users.noreply.github.com> Date: Mon, 5 Aug 2019 15:34:17 -0400 Subject: [PATCH] Made "use strict" Global & Made JSLint Happy --- maths/find_lcm.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/maths/find_lcm.js b/maths/find_lcm.js index de04c66bb..b0017680e 100644 --- a/maths/find_lcm.js +++ b/maths/find_lcm.js @@ -9,11 +9,12 @@ https://en.wikipedia.org/wiki/Least_common_multiple */ +"use strict"; + // Find the LCM of two numbers. function find_lcm(num_1, num_2) { - "use strict"; - var max_num, - lcm; + var max_num; + var lcm; // Check to see whether num_1 or num_2 is larger. if (num_1 > num_2) { max_num = num_1; @@ -32,6 +33,6 @@ function find_lcm(num_1, num_2) { } // Run `find_lcm` Function -var num_1 = 12, - num_2 = 76; +var num_1 = 12; +var num_2 = 76; console.log(find_lcm(num_1, num_2));