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

Def-mex-pt2 Luis Felipe Martinez Guzman#317

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

Def-mex-pt2 Luis Felipe Martinez Guzman#317
luisf89 wants to merge 1 commit intoironhack-labs:masterironhack-labs/lab-javascript-basic-algorithms:masterfrom
luisf89:masterluisf89/lab-javascript-basic-algorithms:masterCopy head branch name to clipboard

Conversation

@luisf89
Copy link

@luisf89 luisf89 commented Jan 18, 2019

No supe como hacer que despliege el mensaje cuando los nombres son iguales.

@ta-web-mex
Copy link

The Driver has the longest name, it has XX characters or
Yo, navigator got the longest name, it has XX characters or
wow, you both got equally long names, XX characters!!

Si te refieres a este caso? esta podria ser una buena solucion

if(Hacker1.length > Hacker2.length){
  console.log("the driver has the longest name it has "+ Hacker1.length + " characters");
  
} else if (Hacker2.length> Hacker1.length){
  console.log("the navigator has the longest name it has "+ Hacker2.length + " characters");
  
} else if(Hacker1.length == Hacker2.length){
  console.log("Wow you goth equally long names it has "+ Hacker2.length+ " characters");
}

Sigue entrenado para sacar el poder

@ta-web-mex ta-web-mex closed this Jan 22, 2019
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.