Skip to content

Comments

Solution to the Palindrome exercise#28

Open
fogha wants to merge 8 commits intojsacademyio:masterfrom
fogha:palindrome
Open

Solution to the Palindrome exercise#28
fogha wants to merge 8 commits intojsacademyio:masterfrom
fogha:palindrome

Conversation

@fogha
Copy link

@fogha fogha commented May 22, 2020

#12

end = str.slice(mid);
newFirst = first.split('').reverse().join('');

if( newFirst == end) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lines 15 to lines 19 could be made into a one liner as such: return newFirst === end
Good solution :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants