Skip to content

PAR FTWD - Basic Algorithms - Aimee and Margaux - #458

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

PAR FTWD - Basic Algorithms - Aimee and Margaux#458
aimeestone wants to merge 1 commit into
ironhack-labs:masterfrom
aimeestone:master

Conversation

@aimeestone

Copy link
Copy Markdown

No description provided.

@ta-web-paris

Copy link
Copy Markdown

you forgot to make a prompt for the hacker2 name,
it's undefined : )
result = window.prompt(message, default);
https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt

var spaceCapitals = hacker1
.toUpperCase()
.split("")
.join(" ");
var upperCaseSeparatedHacker1 = "";

for (var i = 0; i < hacker1.length; i++) {
console.log(spaceCapitals);
}

you don't need a for loop, your string has already been transformed.

//Reverse name
var reverseOrder = "";
for (var i = hacker2.length; i >= 0; i--) {
console.log(hacker2[i]);
}

you reversed the name, but you're logging the string one at a time and not creating a new reversed string.

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