Made "use strict" Global & Made JSLint Happy

This commit is contained in:
PatOnTheBack
2019-08-05 15:34:17 -04:00
committed by GitHub
parent ef7b5bd119
commit 66600374be

View File

@ -9,11 +9,12 @@
https://en.wikipedia.org/wiki/Least_common_multiple https://en.wikipedia.org/wiki/Least_common_multiple
*/ */
"use strict";
// Find the LCM of two numbers. // Find the LCM of two numbers.
function find_lcm(num_1, num_2) { function find_lcm(num_1, num_2) {
"use strict"; var max_num;
var max_num, var lcm;
lcm;
// Check to see whether num_1 or num_2 is larger. // Check to see whether num_1 or num_2 is larger.
if (num_1 > num_2) { if (num_1 > num_2) {
max_num = num_1; max_num = num_1;
@ -32,6 +33,6 @@ function find_lcm(num_1, num_2) {
} }
// Run `find_lcm` Function // Run `find_lcm` Function
var num_1 = 12, var num_1 = 12;
num_2 = 76; var num_2 = 76;
console.log(find_lcm(num_1, num_2)); console.log(find_lcm(num_1, num_2));