Display the values in the console log when Submit button is clicked
I can't seem to make this work. Beginer here. I want to display in the console the values of first and last name. html
```
Js
`function getFormValue() {
const firstName = document.getElementsByName("fname").value;
const lastName = document.getElementsByName("lname").value;
console.log(firstName + lastName);
}`
Nothing apears in the Console. Thank you