Skip to content

Commit

Permalink
исправляет ошибки по линтеру
Browse files Browse the repository at this point in the history
  • Loading branch information
YouAreNotReady committed Nov 18, 2024
1 parent ba72bbf commit 2fab576
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ function isLesserOrEqual(string, maxLength) {
}

function isPalindrome(string) {

Check failure on line 5 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

'isPalindrome' is defined but never used
let normalizedString = string.replaceAll(" ", "").toLowerCase();
let reversedString = normalizedString.split("").reverse().join("");
const normalizedString = string.replaceAll(' ', '').toLowerCase();
const reversedString = normalizedString.split('').reverse().join('');

return normalizedString === reversedString;
}

function toPositiveNumber(string) {

Check failure on line 12 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

'toPositiveNumber' is defined but never used
let normalizedString = string.toString().replaceAll(" ", "");
let result = "";
const normalizedString = string.toString().replaceAll(' ', '');
let result = '';

for (let i = 0; i < normalizedString.length; i++) {
if(!isNaN(Number(normalizedString[i]))) {
result += normalizedString[i];
}
}

return parseInt(result);
return parseInt(result, 10);
}

0 comments on commit 2fab576

Please sign in to comment.