Each time the button #toggleBtn is pressed, make the text of the heading #status alternate between "Off" and "On".
What you'll train
State the constraints
What you get
How to ask the AI
Clearly tell the AI whether the initial display should be "Off" or "On", and the condition for the alternating process, i.e., which text to switch to on each click.
If you ask vaguelyIf you don't specify the initial state, the AI might display "On" from the start, resulting in behavior opposite to what you intended on the first click.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。