⬅ Back to homework list

✍️ HW 1: Sentence Maker

🎯 Your Mission

Write a function called makeSentence that takes 3 words — an animal, a place, and an action — and gives back one fun sentence that uses all three words.

Example: makeSentence("dog", "moon", "danced")
could give back: "One day, a dog flew to the moon and danced all night!"

👀 See it working

Try the finished version first so you know what you're building: open the Word Maker demo ➜

💻 Your Code

📊 Results

Press "Test my code!" to see your score.

🔍 Stuck? Open a hint

Hint 1

You can glue text and words together with + like this:
"A " + animal + " went to the " + place

Hint 2

Your function must give the sentence back using the word return:
return "A " + animal + " ...";

🆘 Show me one answer

function makeSentence(animal, place, action) {
  return "One day, a " + animal + " went to the " + place + " and " + action + " all day!";
}

Type it in, make it pass, then change the sentence to your own!