Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions starter-code/basic-algorithms.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,37 @@
// Names and Input
var hacker1;
hacker = "The driver's name is";
var _XXXX;

_XXXX = "Ricardo";

console.log(hacker + ' ' + _XXXX);

var hacker2;
hacker2 = "Alberto"
let asking = prompt("What's your name?", "The navigator name is" + ' '+ hacker2);

//Conditionals

var edadD = 32;
var edadN = 38;
var char = "characters";
longName1 = "The Driver has the longest name, it has";
longName2 = "The navigator got the longest name, it has";
longName3 = "wow, you both got equally long names,";

if(edadD === edadN){
console.log(longName3 + ' ' + edadN + ' ' + char)
}else{
if(edadD > edadN){
console.log(longName1 + ' ' + edadD + ' ' + char)
}else{console.log(longName2 + ' ' + edadN + ' ' + char)}
}

// Lorem ipsum generator

Comment thread
ta-web-mex marked this conversation as resolved.
Comment thread
ta-web-mex marked this conversation as resolved.
var spz = " "


console.log(_XXXX.toUpperCase() [0] + spz + _XXXX.toUpperCase() [1] + spz + _XXXX.toUpperCase() [2] + spz + _XXXX.toUpperCase() [3] + spz + _XXXX.toUpperCase() [4] + spz + _XXXX.toUpperCase() [5] + spz + _XXXX.toUpperCase() [6]);