We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5511405 commit d53c112Copy full SHA for d53c112
maths/find_lcm.js
@@ -13,21 +13,21 @@
13
14
// Find the LCM of two numbers.
15
function findLcm (num1, num2) {
16
- var max_num
+ var maxNum
17
var lcm
18
// Check to see whether num1 or num2 is larger.
19
if (num1 > num2) {
20
- max_num = num1
+ maxNum = num1
21
} else {
22
- max_num = num2
+ maxNum = num2
23
}
24
- lcm = max_num
+ lcm = maxNum
25
26
while (true) {
27
if ((lcm % num1 === 0) && (lcm % num2 === 0)) {
28
break
29
30
- lcm += max_num
+ lcm += maxNum
31
32
return lcm
33
0 commit comments