title: JavaScript Functions and Parameters
body: <p>This is a very simple JavaScript code but I get this <strong>undefined</strong> error, I don't know what I'm doing wrong. The result I get from the following script is <strong>Great to see you, undefinedRaj</strong>. Can someone please explain what does the undefined refer to and how can I remove it.</p>
  
  <pre><code>   var greeting = function (name) {
     document.write("Great to see you," + " " + name);
     };
  
     document.write(greeting(name) + "Raj");
  </code></pre>