<html>
<body>
<script language = "JavaScript">
function checkName(){
var firstName = document.formEx.first.value;
var lastName = document.formEx.last.value;
console.log("The name you entered is: " + firstName + " " + lastName);
}
</script>
<form name="formEx">
First Name:
<input type="text" name="first" size="20">
Last Name:
<input type="text" name="last" size="25">
<br><br>
Click the button to check that the information is correct.
<br>
<input type="button" value="verify" name="check" onClick='checkName()'>
</form>
</body>
</html>