title: How to use .text() method in a variable with javascript/Jquery
body: <p>Im new to Jquery and i need to convert this js file from js to Jquery. The code i provided probably has many simple mistakes, but i am getting the syntax error on  <code>var textnode = $(.text(task.value));</code> (If there is any extra mistakes please let me know) </p>
  
  <pre><code>  var buttontask = $("#buttontask");
    var task = $("#task");
    var list1 = $("#list1");
    var Delete = $("#delete");
    var Delete1 = $("#delete1");
  
    buttontask.on('click', function () {
    var newE = $('&lt;li&gt;&lt;/li&gt;');
    var textnode = $(.text(task.value));
    var buttondelete = $('#DIV');
    var textnodeX = $(.text('X'));
  
  
    Delete.appendChild(buttondelete);
    newE.appendChild(textnode);
    buttondelete.appendChild(textnodeX);
  
    newE.on('click', function() {
      this.parentNode.removeChild(this);
    });
  
    buttondelete.on('click', function(){
      this.parentNode.removeChild(this);
      newE.parentNode.removeChild(newE);
    });
  </code></pre>
  
  <p><br></p>
  
  <p>code i want to convert to jq</p>
  
  <pre><code>var buttontask = document.getElementById("buttontask");
  var task = document.getElementById("task");
  var list1 = document.getElementById("list1");
  var Delete = document.getElementById("delete");
  var Delete1 = document.getElementById("delete1");
  
  buttontask.addEventListener('click', function () {
    var newE = document.createElement('LI');
    var textnode = document.createTextNode(task.value);
    var buttondelete = document.createElement('DIV');
    var textnodeX = document.createTextNode('X');
  </code></pre>