Skip to content

Commit de1c33e

Browse files
committed
Fix warning by adding radix parameter to parseInt
1 parent eacd120 commit de1c33e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const numberInput = document.getElementById('numberInput');
22
const result = document.getElementById('result');
33
function calculateSumOfDigits() {
4-
const number = parseInt(numberInput.value);
4+
const number = parseInt(numberInput.value, 10);
55
if (isNaN(number)) {
66
result.textContent = 'Please enter a valid number.';
77
return;

0 commit comments

Comments
 (0)