Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Личный проект «Кекстаграм»

* Студент: [Неопознанный енот](https://up.htmlacademy.ru/javascript-individual/2/user/1571355).
* Наставник: [Дмитрий Атаманов].
* Наставник: [Дмитрий Атаманов](https://htmlacademy.ru/profile/atamanov_dmitriy).

---

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,6 @@ <h2 class="success__title">Изображение успешно загруже
<h2 class="data-error__title">Не удалось загрузить данные</h2>
</section>
</template>

<script src="js/functions.js"></script>
</body>
</html>
11 changes: 11 additions & 0 deletions js/functions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//Функция для проверки длины строки.
const checkStringLength = (string = '', maxSimbols = 1) => string.length <= maxSimbols;
window.checkStringLength = checkStringLength;

//Функция для проверки, является ли строка палиндромом.

const isPalindrome = (string) => {
const normalizedString = string.replaceAll(' ', '').toLowerCase();
return normalizedString === normalizedString.split('').reverse().join('');
};
window.isPalindrome = isPalindrome;
Loading