feat/idea: implementing an Easter Egg in Lesson 02 – First AI App (sample-app/app.js
)
#26
Labels
enhancement
New feature or request
Path:
lessons/02-first-ai-app/sample-app/app.js
The goal of this Easter Egg is to allow users to discover a secret response when they input a specific phrase into the code.
In this case, we’ll add a “special prompt” that, when detected, unlocks a hidden secret about time travel.
💡 How Will the Easter Egg Work?
question
variable to"Open the hidden gates"
, the code will reveal a hidden message in the console.🛠 Steps for Implementation
📂 File:
lessons/02-first-ai-app/sample-app/app.js
🔹 Updated Code with the Easter Egg:
📌 Explanation of the Code
1️⃣ Detects if the user changes the
question
variable to"Open the hidden gates"
question.toLowerCase()
matches the Easter Egg trigger.2️⃣ If the user enters this prompt, a secret message will be displayed in the console:
"✨ You have unlocked a hidden AI secret! 🚀"
"🔗 Check out this exclusive resource: https://aka.ms/Secret-AI-JS"
(this link should be pre-created with special content)."🔍 Fun Fact: The first concept of time travel appeared in literature in 1888!"
✅ Impact:
The text was updated successfully, but these errors were encountered: