title: how to change <li> text</li> in Javascript
body: <pre><code>I am trying to replace a list element. 
  </code></pre>
  
  <p>I was able to create node list, but was not able to convert it into a printable string. Does someone know how to print it?
  I have already used home</li>, but I am trying to retrieve the home and replace it with some text like home1. The id = "nav" is CSS id and once the list is received then I want to slice it and play with each list item. Like pointers list in C.</p>
  
  <pre><code>&lt;html&gt;
      &lt;style&gt;
               #nav {
                   position: relative;   
                   display: block;
                   margin-top: 0 10px;       
                   width: auto;
               }
               #nav ul {  
                  display: block;
                  list-style: none;
                  text-align: center;
              }
              #nav li {
                 display: inline-block;
                 position: relative;
             }
             #nav a {
                 position: relative;
                 display: block;
             }
           &lt;/style&gt;
      &lt;body&gt;
          &lt;nav id="nav"&gt;
              &lt;ul&gt;
                  &lt;li&gt;home&lt;/li&gt;
                  &lt;li&gt;about us&lt;/li&gt;
                  &lt;li&gt;News&lt;/li&gt;
                  &lt;li&gt;complaint resolution&lt;/li&gt;
                  &lt;li&gt;contact us&lt;/li&gt;
              &lt;/ul&gt;    
          &lt;/nav&gt;
  
      &lt;script&gt;
          function initt() {
          var args = Array.prototype.slice.call(document.querySelectorAll("li"));
          document.getElementById("nav").innerHTML =  args;    
      }
      initt();
  
      &lt;/script&gt;
      &lt;/body&gt;
      &lt;/html&gt;
  
  Any help will be appreciated.
  </code></pre>