Back to the lesson

Original working file

reference/assignment-walkthrough.txt

Code and working example pages keep their original identifiers and sample text. The lesson and file guidance explain them in your language.

ILLUSTRATIVE WORKED WALKTHROUGH

These steps explain a complete approach. They are not a claim that this live provider/account test was performed for you. Use your own project and record your actual observations.

1. In the server-only mini-explain function, replace the fixed question about a website server with 'Explain DNS in two sentences for a beginner.' Keep the key/model in server environment variables; the full reference function shows the exact edit.

2. Inspect browser-delivered scripts and Network requests. The browser sends its request to your own function; it must not send GEMINI_API_KEY to Google itself. The owner-entered lab code is separate from the provider key.

3. Try a wrong practice code: expect rejection before any provider call. A provider quota/network failure must remain an honest failure, not a canned successful answer. If a real secret was exposed, remove it and rotate it; ignoring the file afterward does not revoke exposure.