Build
Start with two number inputs and one Add button. Label the inputs clearly and display the total.
Change an interface without breaking the interaction.
A heading and paragraph in HTML. You do not need to know JavaScript beyond a variable and a function.
Build a two-number calculator for a learner checking everyday arithmetic. It must show that an empty input is missing, not treat it as zero.
Adding two strings may produce 23 instead of 5, and direct conversion of an empty string may incorrectly produce zero.
Run the checks below and write down what you expected, what happened, and one change you can demonstrate. Self-checks are practice evidence, not a verified grade.
Start with two number inputs and one Add button. Label the inputs clearly and display the total.
Try 2 + 3, a negative number, a decimal and an empty input. Confirm empty input gives a helpful error. Try the operation using a keyboard.
Which change affected presentation, and which affected behaviour?
Add two labelled number fields, an Add button, and a place to announce results.
Ask for test cases before asking for code. Include empty and negative inputs.