mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 02:05:08 +08:00
Made "use strict" Global & Made JSLint Happy
This commit is contained in:
@ -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));
|
||||
|
Reference in New Issue
Block a user