[codebyte]
const quirkyVerbs = [
“Galumph”,
“Skedaddle”,
“Bumble”,
“Wibble”,
“Flibbertigibbet”,
“Snicker-snack”,
“Piffle”,
“Mosey”,
“Bamboozle”,
“Dillydally”
];
const quirkyAdjectives = [
“Whimsical”,
“Befuddled”,
“Squishy”,
“Zigzagging”,
“Giggly”,
“Wonky”,
“Bumptious”,
“Mirthful”,
“Jittery”,
“Zesty”
];
const quirkyNouns = [
“Kaleidoscope”,
“Flibbertigibbet”,
“Whirligig”,
“Gobbledygook”,
“Hullabaloo”,
“Shenanigans”,
“Pandemonium”,
“Malarkey”,
“Gadabout”,
“Brouhaha”
];
const prepositions = [
“about”,
“above”,
“across”,
“after”,
“against”,
“along”,
“among”,
“around”,
“at”,
“before”,
“behind”,
“below”,
“beneath”,
“beside”,
“between”,
“beyond”,
“by”,
“down”,
“during”,
“except”,
“for”,
“from”,
“in”,
“inside”,
“into”,
“like”,
“near”,
“of”,
“off”,
“on”,
“onto”,
“out”,
“outside”,
“over”,
“past”,
“through”,
“to”,
“toward”,
“under”,
“until”,
“up”,
“upon”,
“with”,
“within”,
“without”
];
// Function to get a random element from an array
function getRandomElement(array) {
return array[Math.floor(Math.random() * array.length)];
}
// Function to generate a random silly message
function generateSillyMessage() {
const subjectAdjective = getRandomElement(quirkyAdjectives);
const subjectNoun = getRandomElement(quirkyNouns);
const predicateAdjective = getRandomElement(quirkyAdjectives);
const predicateNoun = getRandomElement(quirkyNouns);
const preposition = getRandomElement(prepositions);
return The ${subjectAdjective} ${subjectNoun} ${preposition} ${predicateAdjective} ${predicateNoun}.
;
}
// Generate and log a random silly message
console.log(generateSillyMessage());[/codebyte]