feat/idea: add a secret script to challenge users in the terminal
Opened this issue ยท 0 comments
๐ฏ Goal:
Create a Node.js script that prompts users to enter a secret code to unlock a hidden message.
๐ Steps to Implement:
-
In
lessons/01-intro-to-genai/characters/, create a new file calledsecret-scroll.js. -
Add the following script:
console.log("\n๐ You have discovered the Lost Scroll of Alexandria! ๐บ");
console.log("To complete your journey, enter the secret code:");
process.stdin.once("data", (data) => {
const input = data.toString().trim();
if (input === "ALEXANDRIA-300BC") {
console.log("\nโจ The Scroll reveals a hidden message:");
console.log("๐ 'JavaScript + AI = The Future!'");
console.log("๐ Check out this secret resource: https://aka.ms/AI-JS-Hidden-Guide\n");
} else {
console.log("\nโ Incorrect code! Try again.");
}
process.exit();
});-
The link
https://aka.ms/AI-JS-Hidden-Guidemust be created beforehand.-
This guide should contain special JavaScript + AI tips, tricks, and resources.
-
Possible contents:
โ Exclusive AI prompts for JavaScript developers
โ Best practices for integrating LLMs in JavaScript applications
โ Links to official OpenAI/Azure AI documentation
โ Sample AI-powered projects in JavaScript
-
-
Add the following command to
package.json:"scripts": { "start": "node characters/app.js", "decipher-scroll": "node characters/secret-scroll.js" }
-
Test by running:
npm run decipher-scroll
-
Ensure that entering
"ALEXANDRIA-300BC"displays the secret message and directs the user to the guide.
โ Expected Outcome: users who discover the hidden command and enter the correct secret code unlock a special resource page filled with AI & JavaScript learning materials.