Write a JavaScript program to display full name of user.
<html>
<head>
<title>String join() method example</title>
<script>
function display()
{
var panel = document.getElementById("panel");
var fname = document.getElementById("first").value;
var lname = document.getElementById("last").value;
var fullName = fname.concat(lname);
alert("Hello, " + fullName);
}
</script>
</head>
<body>
<form method="get" action="#">
First name <input type="text" id="first"/><br/>
Last name <input type="text" id="last"/><br/>
<input type="button" value="Submit" onclick="display()"/>
</form>
<p id="panel"></p>
</body>
</html>
