Ask coding questions

← Back to all posts
Getting an error message
TraceyWhite

I keep getting this error message while trying to write a mad lib with a button to click.
typeError: Cannot read properties of null (reading 'value')
at printmadlib (/script.js:4:64)
at HTMLButtonElement.onclick (/:19:49)

Any Ideas would be great!

Voters
TraceyWhite
Comments
hotnewtop
SixBeeps

IDs are case sensitive. Your ID in the HTML is all lower case, but in the JavaScript code you capitalized the first letter.