mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 16:26:47 +08:00
Fix/code smells (#1338)
* ♻️ refactor: improving and fixing some code * Updated Documentation in README.md * ♻️ refactor: improving isLeapYear * 🐛 chore: back changes * 🐛 fix: using reduce instead forEach * 🐛 fix: using reduce instead forEach * 🐛 fix: removing duplicated code * 🐛 chore: removing .js --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -12,7 +12,7 @@ export const palindromeRearranging = (str) => {
|
||||
return 'Not a string'
|
||||
}
|
||||
// Check if is a empty string
|
||||
if (str.length === 0) {
|
||||
if (!str) {
|
||||
return 'Empty string'
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user