Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@galatoide
Copy link

@ironhack-LIS-PTWD
Copy link

ironhack-LIS-PTWD commented Feb 12, 2020

Hi Wilson,
really well done!
In iteration 3.3 the lab wants you to sort the name by alphabetical order. I would recommend you to use the method .localeCompare() check out how to use it here

For the last 2. Bonus have a look at this solution:

//change around phraseToCheck to text results
const phraseToCheck = "Amor, Roma";

// 1st Remove spaces from String
let removedSpaces = "";
for(i= 0; i < phraseToCheck.length; i++){
  if(phraseToCheck[i] === " "){
    continue
  } else {
    removedSpaces += phraseToCheck[i].toLowerCase()
  }
}
// 2nd compare every index from front with every index from end
let output = ""
for(i = 0; i < removedSpaces.length; i++) {
  if(removedSpaces[i] === removedSpaces[removedSpaces.length-1-i]) {
    output = `${phraseToCheck} is a Palindrome. :) `
  } else {
    output = `${phraseToCheck} is not a Palindrome. :( `
    break }
}
console.log("Bonus 2: ",output)

Hope this helps :)
Paula

@stale
Copy link

stale bot commented Mar 13, 2020

This pull request has been automatically marked as stale because it didn't have any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 13, 2020
@stale
Copy link

stale bot commented Mar 15, 2020

This pull request is closed. Thank you.

@stale stale bot closed this Mar 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.