Show notes
- Learnt when attaching an event listener on a form, you always attach it to the <form> element and NOT to the button itself.
- Learnt about using the ‘event object’ and what you can do with it
- Prevent default 'refresh' behaviour of the submit event
- Firefox devtools is better than Chrome here as it visually shows you when you have selected the field.
- Get a reference to the username field and log it to the console. Clue - use the ID of the input field.
- Regex basics. A regular expression (regex) is a matching pattern that only allows a certain combination or pattern of characters to be entered i.e. 4-18 characters and only containing letters and numbers

