Skip to content

LIS-WDPT-FEB-Bruno Pais - #744

Closed
BrunoMSPais wants to merge 2 commits into
ironhack-labs:masterfrom
BrunoMSPais:master
Closed

LIS-WDPT-FEB-Bruno Pais#744
BrunoMSPais wants to merge 2 commits into
ironhack-labs:masterfrom
BrunoMSPais:master

Conversation

@BrunoMSPais

Copy link
Copy Markdown

@ironhack-LIS-PTWD

I believe that is according to what was asked.
I have commented all my code explaining it.
If you have anything to point out please do so.

Se you in class.

Cheers!

@ironhack-LIS-PTWD

Copy link
Copy Markdown

Hi Bruno,
well done, perfect Solution and nicely commented code.
keep it up :)
Paula

@ironhack-LIS-PTWD

Copy link
Copy Markdown

One minor thing I saw is your solution to Bonus 1:

the way you are checking for "et" you are not taking into account for an "et" at the beginning and the end. or followed by any of these ". , ? ! " . If you want to be really precise have a look at this: .replace(/[.,?!]/g, "")

const lorem = "Et Lorem ipsum dolor et sit amet consectetur adipisicing elit. Sapiente culpa quisquam ipsa setit nulla! Quo ea dolores placeat et blanditiis. Et Minuset necessitatibus et consequuntur perferendis haetrum dolorem? et. et! et?"

let testLoremAltern = lorem.toLowerCase().replace(/[.,?!]/g, "")
let countEtAltern = 0;
for (let i = 0; i < testLoremAltern.length; i++) {
    if (testLoremAltern[i] === "et" ) {
        countEtAltern++
    }
}
console.log(`Bonus 1 (altern): Lorem Ipsum contains ${countEtAltern} "et".`)

Cheers :)
Paula

@stale

stale Bot commented Mar 13, 2020

Copy link
Copy Markdown

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

stale Bot commented Mar 15, 2020

Copy link
Copy Markdown

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