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

Problem 66: Display the Number of Characters Typed

Each time a character is typed into the input field #textInput, display the number of characters entered in the paragraph #charCount.

What you'll train

Specify the input

What you get

  • Specify real-time updating
  • Choose the event type
  • Clarify the target element

How to ask the AI

Tell the AI that the character count in #charCount should update in real time each time a character is typed into #textInput. It also helps to specify explicitly whether it should display 0 when the input field becomes empty.

If you ask vaguelyThe AI tends to use the change event, resulting in an implementation where the character count only updates after the field loses focus.

あなたのコード

実行しました

プレビュー

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

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

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