Skip to content

Andres Ballares - #178

Open
AndresBallares wants to merge 2 commits into
joinpursuit:masterfrom
AndresBallares:master
Open

Andres Ballares#178
AndresBallares wants to merge 2 commits into
joinpursuit:masterfrom
AndresBallares:master

Conversation

@AndresBallares

Copy link
Copy Markdown

No description provided.

Comment thread problems/strings.js
*/
function firstChar() {}
const firstChar = (str) => {
return str.charAt(0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Although this works, you should prefer bracket notation. str[0]

Comment thread problems/strings.js

function lastLetter() {}
const lastLetter = (str) => {
return str.slice(-1);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

prefer str[str.length - 1]

Comment thread problems/strings.js
}
}
return newString;
};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

Comment thread problems/strings.js
let arr = string.split(" ");
for(let i = 0; i < arr.length; i++){
if(arr[i].length >= 5 ){
arr[i] = disemvowel(arr[i]);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

very cool to use your helper function

Comment thread problems/strings.js

function reverseSentenceWords() {}
function reverseSentenceWords(string) {
return string.split("").reverse().join("").split(" ").reverse().join(" ");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Make sure you understand how every line of this is working 👍

@AndresBallares

AndresBallares commented Jan 26, 2021 via email

Copy link
Copy Markdown
Author

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