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

MIA-Neil_Dali-Exercise#94

Closed
rojasdali wants to merge 1 commit intoironhack-labs:masterironhack-labs/lab-javascript-basic-algorithms:masterfrom
rojasdali:masterrojasdali/lab-javascript-basic-algorithms:masterCopy head branch name to clipboard
Closed

MIA-Neil_Dali-Exercise#94
rojasdali wants to merge 1 commit intoironhack-labs:masterironhack-labs/lab-javascript-basic-algorithms:masterfrom
rojasdali:masterrojasdali/lab-javascript-basic-algorithms:masterCopy head branch name to clipboard

Conversation

@rojasdali
Copy link

No description provided.

for (i = 0; i < hacker1.length; i++)
{
s += hacker1[i].toUpperCase() + " ";

Copy link
Contributor

Choose a reason for hiding this comment

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

Good approach although the cleaner solution is using JS methods:

for (var i = 0; i < 1; i++) {
  console.log(
    hacker1
      .split("")
      .join(" ")
      .toUpperCase()
  );
}

for (i = hacker2.length-1; i >= 0; i--)
{
t += hacker2[i]

Copy link
Contributor

Choose a reason for hiding this comment

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

The same as above:

for (var i = 0; i < 1; i++) {
  console.log(
    hacker1
      .split("")
      .reverse(" ")
      .join("")
  );
}

@sandrabosk
Copy link
Contributor

Amazing work! Thank you for submitting!

@sandrabosk sandrabosk closed this Apr 3, 2018
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

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