mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 11:08:54 +08:00
Remove live code & console.log, leave examples as comments.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
*
|
||||
**/
|
||||
|
||||
const palindromeRearranging = (str) => {
|
||||
export const palindromeRearranging = (str) => {
|
||||
// check that input is a string
|
||||
if (typeof str !== 'string') {
|
||||
return 'Not a string'
|
||||
@ -27,5 +27,9 @@ const palindromeRearranging = (str) => {
|
||||
}
|
||||
|
||||
// testing
|
||||
console.log(palindromeRearranging('aaeccrr')) // true
|
||||
console.log(palindromeRearranging('leve')) // false
|
||||
|
||||
// > palindromeRearranging('aaeccrr')
|
||||
// true
|
||||
|
||||
// > palindromeRearranging('leve')
|
||||
// false
|
||||
|
Reference in New Issue
Block a user