CodeDrill
day_streak: --
← 問題一覧に戻る
JavaScript ・ DOM Manipulation

Problem 5: Toggle detail visibility with a checkbox

By turning the checkbox #showToggle on and off, toggle the visibility of the paragraph #detail (display: block / display: none).

What you'll train

State the constraints

What you get

  • Specify the initial display state
  • Show the on/off conditions
  • Convey how to change the style

How to ask the AI

Tell the AI that it should be display:block when checked and display:none when unchecked, and also convey the initial state when the page loads.

If you ask vaguelyIf you don't convey the initial state, #detail might remain displayed when the page loads, contradicting the checkbox's state.

あなたのコード

実行しました

プレビュー

AIレビュー(プロンプト練習)

コードはChatGPTやClaudeに出させたものを貼って構いません。
ここでの本番は「次にAIへ出す指示」です。評価軸は1つだけ見て、弱点・指示の穴・改善例を返します。
テストに落ちていてもレビューできます。落ちた理由と、指示に足りなかった情報を結びつけます。

先にコードを実行し、テストを1つ以上通してください。