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

Conversation

@chiko15
Copy link

@chiko15 chiko15 commented Apr 2, 2018

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
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
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
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
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

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