mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2026-03-13 15:21:15 +08:00
fixed some spellings
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
const digitSum = (num) => {
|
||||
// sum will store sum of digits of a number
|
||||
let sum = 0
|
||||
// while will run untill num become 0
|
||||
// while will run until num become 0
|
||||
while (num) {
|
||||
sum += num % 10
|
||||
num = parseInt(num / 10)
|
||||
|
||||
Reference in New Issue
Block a user