// Define the story parts as objects
const story = {
intro: "Once upon a time, in a kingdom far away...",
king: "There was a wise and just king who ruled the land.",
crisis: "But the kingdom faced a terrible crisis...",
quest: "The king decided to embark on a quest...",
victory: "After many trials and hardships, the king emerged victorious.",
conclusion: "And so, the kingdom flourished under the wise rule of the king."
};
// Function to narrate the story
function narrateStory() {
console.log(story.intro);
console.log(story.king);
console.log(story.crisis);
console.log(story.quest);
console.log(story.victory);
console.log(story.conclusion);
}
// Call the function to start the story narration
narrateStory();
0 Comments