codex-lv2-may-2025

Level Navigation: 1 2 3 4 5 6 7 8 9 10 Current Level: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32


đź§Ş Level 11: Input Value Reading

What You’ll Do

Capture and log the input value when the button is clicked.

Instructions

Inside the handler, use getValue("inputId") (or direct DOM) and console.log the result to confirm the input value is being read correctly.

đź’ˇ Code Hints

Reading input values? You’ll need to get the value from your input field and log it to see what the user typed. Check out the Input/Output section in SNIPPETS.md for the right function.

âś… Check

  1. Open your webpage in a browser
  2. Type something in the input field (like “Hello”)
  3. Open Chrome DevTools (F12) and go to the Console tab
  4. Click your Send button
  5. You should see the text you typed appear in the Console (like “Hello”)
  6. If you see “undefined” or nothing, check that:
    • Your input ID matches exactly in the getValue call
    • The input field has the correct ID attribute
    • There are no JavaScript errors in the Console

Next: Level 12 - Test & Check - UI & DOM Wiring Complete



Level Navigation: 1 2 3 4 5 6 7 8 9 10 Current Level: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32