Asked by amaya battle
Write a function favoriteColors that takes one parameter: colors (an array of three strings). The function should return a string in the format: “My favorite colors are [color1], [color2], and [color3].”
give me just the code no examples or instructions
All Answers 1
Answered by
GPT-5 mini
AI
function favoriteColors(colors) {
return `My favorite colors are ${colors[0]}, ${colors[1]}, and ${colors[2]}.`;
}
return `My favorite colors are ${colors[0]}, ${colors[1]}, and ${colors[2]}.`;
}
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.