Each time the button #countBtn is pressed, increase the number shown in the heading #count by 1 and display it.
What you'll train
State the constraints
What you get
How to ask the AI
Specifically tell the AI that the count's initial value is 0, that it increases by 1 with each click, and how the increased number should be displayed in #count.
If you ask vaguelyIf you don't state the initial value, the AI might leave #count's initial display as an empty string, causing the number to jump unexpectedly on the first click.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。