title: document.title problems in Javascript
body: <p>I am new to JS and learning from a JAVASCRIPT and JQUERY book by JON DUCKETT.</p>
  
  <p>I was struck at a problem regarding the <strong>document.title</strong> usage</p>
  
  <p>I wrote a code on how to use document objects.</p>
  
  <p>Every property and methods are working except for the title </p>
  
  <p>I attached a code please have a look and help me how to get the <strong>title</strong>
  property working.</p>
  
  <p>The code is as following : </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Hammer&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;h1&gt;THANOS&lt;/h1&gt;
    &lt;div id="tony"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;script&gt;
      var lord = "&lt;p&gt; The title of the page is :" + document.title + "&lt;/p&gt;";             
       
       lord += "&lt;p&gt;address of the page is : " + document.URL + "&lt;/p&gt;";
  
       lord += " &lt;p&gt;Last modified is : " + document.lastModified + "&lt;/p&gt;";
  
       var man = document.getElementById("tony");
       man.innerHTML = lord;
  &lt;/script&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>output:
          THANOS</p>
  
  <pre><code> The title of the page is : 
  
   address of the page is : https://fiddle.jshell.net/_display/
  
   Last modified is : 07/14/2018 10:28:57
  </code></pre>
  
  <p>title not displaying why? </p>
  
  <p>And what is the meaning of the += in the code please help</p>
  
  <p>Sorry I don't have the reputation of 10 to post an image I had to write this code.</p>