Advice Mixed Message

Hi, my first outer codecademy project.

Super simple random advice generator.

Took like 3 minutes to make, so very easy, but still weirdly proud of it, haha.

Feedback is appreciated!

const randomMessage = () => {
var messages = [‘Be decisive’, ‘Think outside of the box’, ‘Consult someone with more experience’, ‘Take a break, and get back to it later’, ‘Follow your gut’];
for(i in messages)
var random = Math.floor(Math.random() * messages.length)
return messages[random];

1 Like

You seemed to have written the code well and concisely-good job! One thing to note is use const or let over var as (most of the time) it’s better programming practise: see this article for more.

1 Like

Looks good :slight_smile: Have you shared it on GitHub?