When a color is selected from the select box #colorSelect, make it so that the background color of the square #colorBox becomes the selected color. Use the change event.
What you'll train
Specify the input
What you get
How to ask the AI
Clearly tell the AI that when the value of the select box #colorSelect changes, the background color of #colorBox should be set to that value, using the change event. It also helps to mention that the option's value can be used directly as the color name.
If you ask vaguelyThe AI tends to use the input event instead, resulting in an implementation that runs before the selection is finalized.
あなたのコード
プレビュー
AIレビュー(プロンプト練習)
コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。