microsoft / microsoft/generative-ai-with-javascript
feat/idea: add a secret script to challenge users in the terminal
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.3k
- Forks
- 841
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 1
Description
🎯 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lessons/01-intro-to-genai/characters/ and package.json, then run the existing project commands to understand the script layout. Add secret-scroll.js, the decipher-scroll npm command, and the requested guide link and content. Done means npm run decipher-scroll accepts the stated code and displays the hidden message and guide URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, content
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100