Skip to content

Luis Flores - #108

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

Luis Flores#108
chiko15 wants to merge 1 commit into
ironhack-labs:masterfrom
chiko15:master

Conversation

@chiko15

@chiko15 chiko15 commented Apr 2, 2018

Copy link
Copy Markdown

I worked with Rob and Randy

var hacker2 = prompt("What is your name?");
console.log("The navigator's name is " + hacker2)

if (hacker1.length > hacker2.length){

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.

At this point, hacker1 is not defined. So we have to define it first.

//Conditionals
for (x = 0; x < hacker1.length; x++){
displayString = displayString + hacker1[x].toUpperCase()
+ " ";

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.

This works: displayString = hacker1[x].toUpperCase() + " ";
Although, better solution would be something like this:

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


// Lorem ipsum generator
for (x = hacker2.length -1 ;x >= 0;x--){
backwardString = backwardString + hacker2[x] ;

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.

The same as up, this could work: backwardString = hacker2[x] ;

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

@sandrabosk

Copy link
Copy Markdown
Contributor

Good job overall! 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