thoughts on the below for feedback?

const baseLocation = [“London”, “New York”, “Tokyo”, “Bali”, “Germany”, “Iceland”, “Scotland”];
const spiritAnimal = [“Polar Bear”, “Wolf”, “Giraffe”, “Shark”, “Otter”, “Lion”, “Rat”]
const todaysLuck = [“Bad”, “Not great”, “Amazing”, “God like”, “Will be okay”, “Buy a lottery ticket”]

let mixedMessages = (arrOne, arrTwo, arrThree) => {

let messageOne = arrOne[Math.floor(Math.random() * (arrOne.length - 1))];
let messageTwo = arrTwo[Math.floor(Math.random() * (arrTwo.length -1))];
let messageThree = arrThree[Math.floor(Math.random() * (arrThree.length -1))];

return `Messages for you today are: 

You should base yourself today in ${messageOne}.

Your Spirit Animal today is ${messageTwo}.

Your Luck today will be ${messageThree}.`


console.log(mixedMessages(baseLocation, spiritAnimal, todaysLuck));

I think (arrOne.length - 1) should be arrOne.length (without the - 1 )
since Math.floor(Math.random() * 5) would give you a result of 0 to 4 (meaning 0, 1, 2, 3, or 4)

thanks for the input :), not too sure what you mean though…

The idea is it will give a random index number for any array placed in. the reason for the “-1” on the array is the index number would start from 0 the length would start from one…i think…