Mixed Messages - Create your ninja name (With UI). I will appreciate feedbacks


And If you want to contact me to make a project or something here is my discord: nicolp#1010
Leave in the comments what’s your ninja name (xD) Regards.

1 Like

By creating an actual page, you did a lot more work than was required for the project. Nice to see the code functioning like that though.

I can’t speak to the html related parts just yet, but if you want a suggestion for the message part you could reduce the number of variables by using a loop instead of

function randomizeNinjaName() {
let random = NINJA_NAMES_FRAGMENTS[randomKey()];
let random_2 = NINJA_NAMES_FRAGMENTS[randomKey()];
let random_3 = NINJA_NAMES_FRAGMENTS[randomKey()];

return `${random}${random_2}${random_3}`;

};

you could do something like this:

let random = "";
for (let i = 1; i<=3; i++){
   let random += NINJA_NAMES_FRAGMENTS[randomKey()];
}
1 Like

well thought, I will try that, thank you!