Skip to content

Commit d53c112

Browse files
authored
find_lcm.js: Standardjs fixes (#146)
1 parent 5511405 commit d53c112

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

maths/find_lcm.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@
1313

1414
// Find the LCM of two numbers.
1515
function findLcm (num1, num2) {
16-
var max_num
16+
var maxNum
1717
var lcm
1818
// Check to see whether num1 or num2 is larger.
1919
if (num1 > num2) {
20-
max_num = num1
20+
maxNum = num1
2121
} else {
22-
max_num = num2
22+
maxNum = num2
2323
}
24-
lcm = max_num
24+
lcm = maxNum
2525

2626
while (true) {
2727
if ((lcm % num1 === 0) && (lcm % num2 === 0)) {
2828
break
2929
}
30-
lcm += max_num
30+
lcm += maxNum
3131
}
3232
return lcm
3333
}

0 commit comments

Comments
 (0)