I was not feeling very creative, so just the simplest thing here

To be honest, I did it too fast, maybe I will come back in the future to do sth nicer. But I thought anyhow a simple version can be of some use to somebody there, so I am posting it :slight_smile:

console.log('This is a very important and secret message for you:'); // Here I define the three parts, subject, verb and adverb. let subjects = ['The life', 'A forest', 'Your house', 'A mountain', 'The river', 'Your son', 'A symbol', 'A computer', 'A spoon']; let actions = ['likes drinking', 'is beautiful', 'is warm', 'plays cards', 'lays down', 'sleeps', 'has rescued', 'runs', 'rains', 'cries']; let adverbs = ['a lot', 'at home', 'sometimes', 'with friends', 'like crazy', 'middays', 'at 10pm', 'in Hawai', 'on summer', 'nicely', 'with your mother']; // Here I create a function for randomly select a number between 0 and x. let randomIntFromInterval = (max) => { return Math.floor(Math.random() * (max)); }; // Here I call the previous function using the length of each array as max const val1 = randomIntFromInterval(subjects.length); const val2 = randomIntFromInterval(actions.length); const val3 = randomIntFromInterval(adverbs.length); // Here we use the random number as index to select our fragments const subject = subjects[val1]; const action = actions[val2]; const adverb = adverbs[val3]; // And here we log the random message console.log(`${subject} ${action} ${adverb}!.`);

Hello!

The only advice: put your console.log() together at the end of code. So you code will be structured in this sequence: variables initializations, functions declaration, main code. Structured code is easier to read.

Good work!

Thanks a lot!! You are right, it would be clearer that way, it makes more sense :slight_smile: