Skip to content

Commit

Permalink
добавляет дополнительную функцию
Browse files Browse the repository at this point in the history
  • Loading branch information
Suninall committed Nov 25, 2024
1 parent 42da89c commit d8ea030
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions js/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,17 @@ function checkPalindrom(stringPalindrom){
}

checkPalindrom("топот");

function findNumber(inputString) {
let result = "";
for (let i of inputString) {
i = parseInt(i, 10);
if(!isNaN(i)) {
result = result + i;
}
}
result = result.replaceAll(" " , "");
return (parseInt(result, 10));
}

findNumber("2023 hhh");

0 comments on commit d8ea030

Please sign in to comment.