JavaScript Program to Display Full Name of User

Write a JavaScript program to display full name of user.

Source Code
    <title>String join() method example</title>
        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);
<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()"/>
<p id="panel"></p>