Hi guys, let me know what you think please. I tried to make it as readable and with as much good practice as I could.
Cool.
And it’s finally answered the question that’s been keeping me up at night…
it was the dog that moved the car!
edit:
forgot to mention. It’s looks very clean, well set out and easy to read.
Good habits to have - he says, shuffling nervously and covering his own screen.
My solution: Github link for mixedmessage solution random sentence
const words = {
first: ["Jingles", "Holly", "Kringle", "Buddy", "Snowflake", "Twinkle", "Ginger", "Trixie", "Noel", "Tinsel", "Winter", "Rudy"],
middle: ["the merry", "the playful", "the frosty", "the festive", "the jolly", "the little", "the snowy", "the nice", "the glittery", "the sparkly", "the joyvial", "the lively"],
end: ["Angel", "Evergreen", "Ornament", "Tinsel", "Cookie", "Snowman", "Gumdrop", "Sleigh bells", "Cupcake", "Reindeer", "Candy cane", "Garland"]
}
//Generate random word from element of words along the parameter
function randomWords(threeFrom) {
const numFromWords = Math.floor((Math.random() * threeFrom.length));
return threeFrom[numFromWords];
};
console.log(`What is your random ELF name ? You are: ${randomWords(words.first)} ${randomWords(words.middle)} ${randomWords(words.end)} `);