Select a category to begin (Fruits, Vegetables, Things, etc.).
A riddle will appear, and you must type the answer.
Click “Submit” to check your answer.
Click “Back” to choose another category.
At the end, see a fun emoji and a thank-you message!
Fruits
Vegetables
Things
Places
Animals
Birds
Submit
Back
Thank you for playing! 🎉
😊
const riddles = {
Fruits: [
{ question: “I am yellow and monkeys love me. What am I?”, answer: “Banana” },
{ question: “I am red and round, and you can make juice from me. What am I?”, answer: “Apple” },
{ question: “I am orange, and rabbits love me. What am I?”, answer: “Carrot” },
{ question: “I am green on the outside and red inside with black seeds. What am I?”, answer: “Watermelon” },
{ question: “I am sour and yellow, often used in drinks. What am I?”, answer: “Lemon” },
],
Vegetables: [
{ question: “I am long, green, and used in salads. What am I?”, answer: “Cucumber” },
{ question: “I grow underground and make you cry when you cut me. What am I?”, answer: “Onion” },
{ question: “I am green and round, and grow in a pod. What am I?”, answer: “Pea” },
{ question: “I am orange and grow underground. What am I?”, answer: “Carrot” },
{ question: “I am green and look like tiny trees. What am I?”, answer: “Broccoli” },
],
Things: [
{ question: “You sit on me. What am I?”, answer: “Chair” },
{ question: “I have pages and you read me. What am I?”, answer: “Book” },
{ question: “I keep time for you. What am I?”, answer: “Clock” },
{ question: “I help you write. What am I?”, answer: “Pen” },
{ question: “I hold water and you drink from me. What am I?”, answer: “Glass” },
],
Places: [
{ question: “I am a place where you learn. What am I?”, answer: “School” },
{ question: “I am a place where sick people go. What am I?”, answer: “Hospital” },
{ question: “I am a place with lots of trees and animals. What am I?”, answer: “Forest” },
{ question: “I am a place with sand and water. What am I?”, answer: “Beach” },
{ question: “I am a place where you buy things. What am I?”, answer: “Market” },
],
Animals: [
{ question: “I roar and live in the jungle. What am I?”, answer: “Lion” },
{ question: “I am man’s best friend. What am I?”, answer: “Dog” },
{ question: “I purr and chase mice. What am I?”, answer: “Cat” },
{ question: “I live in water and have fins. What am I?”, answer: “Fish” },
{ question: “I am big and have a trunk. What am I?”, answer: “Elephant” },
],
Birds: [
{ question: “I am colorful and can talk. What am I?”, answer: “Parrot” },
{ question: “I am black and can caw. What am I?”, answer: “Crow” },
{ question: “I lay eggs and people eat them. What am I?”, answer: “Hen” },
{ question: “I am pink and stand on one leg. What am I?”, answer: “Flamingo” },
{ question: “I fly at night and can see in the dark. What am I?”, answer: “Owl” },
]
};
const categorySelection = document.getElementById(“category-selection”);
const riddleContainer = document.getElementById(“riddle-container”);
const riddleElement = document.getElementById(“riddle”);
const typeWordInput = document.getElementById(“type-word-input”);
const result = document.getElementById(“result”);
const thankYou = document.getElementById(“thank-you”);
const emoji = document.getElementById(“emoji”);
const bgMusic = document.getElementById(“bg-music”);
let currentCategory = “”;
let currentRiddleIndex = 0;
const setCategory = (category) => {
currentCategory = category;
currentRiddleIndex = 0;
categorySelection.style.display = “none”;
riddleContainer.style.display = “block”;
loadRiddle();
bgMusic.play();
};
const loadRiddle = () => {
const riddle = riddles[currentCategory][currentRiddleIndex];
riddleElement.textContent = riddle.question;
};
const checkAnswer = () => {
const userAnswer = typeWordInput.value.trim();
const correctAnswer = riddles[currentCategory][currentRiddleIndex].answer;
if (userAnswer.toLowerCase() === correctAnswer.toLowerCase()) {
result.textContent = “Correct! 🎉”;
result.style.color = “green”;
} else {
result.textContent = `Wrong! The correct answer was “${correctAnswer}”.`;
result.style.color = “red”;
}
currentRiddleIndex++;
if (currentRiddleIndex {
riddleContainer.style.display = “none”;
thankYou.style.display = “block”;
emoji.textContent = “😊”;
};
const resetGame = () => {
categorySelection.style.display = “block”;
riddleContainer.style.display = “none”;
thankYou.style.display = “none”;
result.textContent = “”;
bgMusic.pause();
bgMusic.currentTime = 0;
};
By prioritizing effective communication between families we can create a supportive environment that promotes the child’s academic success, emotional well-being, and overall development.