From 99232749bab03c8ebc77d6cc666fee1918ed564c Mon Sep 17 00:00:00 2001 From: Uriel Camargo Date: Sun, 29 Apr 2018 15:34:40 -0500 Subject: [PATCH 1/2] almost --- starter-code/basic-algorithms.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/starter-code/basic-algorithms.js b/starter-code/basic-algorithms.js index 82f20d8ba..a66cbba8c 100644 --- a/starter-code/basic-algorithms.js +++ b/starter-code/basic-algorithms.js @@ -1,7 +1,16 @@ // Names and Input +var hacker1 = ""; +var hacker2= window.prompt(message, "¿Cual es tu nombre?"); +console.log("The drive is XXXX"); +console.log("The navigator's name is YYYY"); //Conditionals - - +if(hacker1.length > hacker2.length){ + console.log("The Driver has the longest name, it has" + hacker1.length +" characters"); +}else if(hacker1.length < hacker2.length){ + console.log("Yo, navigator got the longest name, it has " + hacker2.length + " characters"); +}else if(hacker1.length === hacker2.length){ + console.log("wow, you both got equally long names, "+ hacker1.length +" characters!!") +} // Lorem ipsum generator From 0f1c1f5bbc3c71eaddaac0777a8f818ea6dd3d32 Mon Sep 17 00:00:00 2001 From: Uriel Camargo Date: Sun, 29 Apr 2018 15:39:27 -0500 Subject: [PATCH 2/2] se me olvido guardar... --- starter-code/basic-algorithms.js | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/starter-code/basic-algorithms.js b/starter-code/basic-algorithms.js index a66cbba8c..d7c15fd20 100644 --- a/starter-code/basic-algorithms.js +++ b/starter-code/basic-algorithms.js @@ -1,16 +1,32 @@ // Names and Input -var hacker1 = ""; -var hacker2= window.prompt(message, "¿Cual es tu nombre?"); +var hacker1 = "Uriel"; +var hacker2= window.prompt("¿Cual es tu nombre?"); -console.log("The drive is XXXX"); -console.log("The navigator's name is YYYY"); +console.log("The drive is " + hacker1); +console.log("The navigator's name is " + hacker2); //Conditionals + if(hacker1.length > hacker2.length){ - console.log("The Driver has the longest name, it has" + hacker1.length +" characters"); + console.log("The Driver has the longest name, it has " + hacker1.length +" characters"); }else if(hacker1.length < hacker2.length){ - console.log("Yo, navigator got the longest name, it has " + hacker2.length + " characters"); +console.log("Yo, navigator got the longest name, it has " + hacker2.length + " characters"); }else if(hacker1.length === hacker2.length){ - console.log("wow, you both got equally long names, "+ hacker1.length +" characters!!") +console.log("wow, you both got equally long names, "+ hacker1.length +" characters!!") +} + +for(i=0; i< hacker1.length; i++){ +console.log(hacker1[i].toUpperCase() + " "); +} + + +for(i=0; i< hacker2.length; i++){ +console.log(hacker2[i]); } + // Lorem ipsum generator + + + + +