Skip to content

[BET-FT] Jason Franklin, Nora Nicklis #610

Closed
Norizinus wants to merge 1 commit into
ironhack-labs:masterfrom
Norizinus:master
Closed

[BET-FT] Jason Franklin, Nora Nicklis #610
Norizinus wants to merge 1 commit into
ironhack-labs:masterfrom
Norizinus:master

Conversation

@Norizinus
Copy link
Copy Markdown

Done

@Norizinus Norizinus changed the title Jason Franklin, Nora Nicklis - Berlin - W1D1 Lab [BET-FT] Jason Franklin, Nora Nicklis Jan 7, 2020
Comment thread js/index.js
console.log(
`Wow, you both have equally long names, ${hacker2.length} characters!`
);
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread js/index.js
let hacker1 = "Nora";
//console.log(`The driver's name is ${hacker1}`);
let hacker2 = "Jason";
//console.log(`The navigators's name is ${hacker2}`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Comment thread js/index.js
for (let i = 0; i < hacker1.length; i++) {
upperCaseName += hacker1[i].toUpperCase() + " ";
}
console.log(upperCaseName);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looking below that you already understand how .split() and .join() works. What you can do here is simply

hacker1.split("").toUpperCase().join(" ")

Comment thread js/index.js
.split("")
.reverse()
.join("")
);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍 Nice

Comment thread js/index.js

// Iteration 3: Loops

if (hacker1 < hacker2) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I would be careful to do this when you want to sort by lexicographical order because it does work for every case. Best is to use localeCompare()

@stale
Copy link
Copy Markdown

stale Bot commented Feb 6, 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 Feb 6, 2020
@stale
Copy link
Copy Markdown

stale Bot commented Feb 8, 2020

This pull request is closed. Thank you.

@stale stale Bot closed this Feb 8, 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