+ 1
1. explaining null
you tried to access DOM before it exists.
https://www.sololearn.com/post/90825/?ref=app
https://www.sololearn.com/post/233784/?ref=app
https://code.sololearn.com/WKKkpq0efxai/?ref=app
2. fix:
https://code.sololearn.com/Wyit05d0LNvi/?ref=app
3. your other mistake:
use value to get value of input element
typo txt2 not txt1 for second input



