Skip to content

Commit

Permalink
Merge pull request #2 from plkrvk/module2-task1
Browse files Browse the repository at this point in the history
  • Loading branch information
keksobot authored Sep 25, 2024
2 parents 64bfa9b + bcbfd09 commit 7f17e5b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions js/functions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
function checkLenght (string, maxLength) {
if (string.length <= maxLength) {
return true;
} else {
return false;
}
}
console.log(checkLenght('проверяемая строка', 10));

Check failure on line 8 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

Unexpected console statement

function isPalingrome (string) {

Check failure on line 10 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

'isPalingrome' is defined but never used
string = string.replaceAll(' ', '');
string = string.toLowerCase();
reverseString = '';

Check failure on line 13 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

'reverseString' is not defined
for (let i = string.length - 1; i >= 0; i--) {
reverseString+=string[i];

Check failure on line 15 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

Expected indentation of 4 spaces but found 6

Check failure on line 15 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

'reverseString' is not defined

Check failure on line 15 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

Operator '+=' must be spaced
}
if (reverseString === string) {

Check failure on line 17 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

'reverseString' is not defined
return true;

Check failure on line 18 in js/functions.js

View workflow job for this annotation

GitHub Actions / Check

Expected indentation of 4 spaces but found 6
}
return false;
}

0 comments on commit 7f17e5b

Please sign in to comment.