title: Trying to extract only sentences which include specific words in Javascript
body: <p>I just started learning Javascript, and I'm trying to code a way to extract and write in a list only sentences that include specific words in a text.</p>
  
  <p>This is the idea I had here below, but this is obviously not working and I do not find any solution. Could you please give me some syntax advice or anything? </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-js lang-js prettyprint-override"><code>function DetectConcl() {
    var Conclusions = ["so", "hence", "as a consequence"];
    var Entry = document.getElementById("enter").value;
    var EntryLow = Entry.toLowerCase();
    var Sentences = EntryLow.split(".");
    var Results = [];
  
    for (var i = 0; i &lt; Conclusions.length; i++) {
      for (var j = 0; j &lt; Sentences.length; j++) {
        if (Sentences[j].includes(Conclusions[i])) {
          Results.push(Sentences[j]);
        }
      }
    }
  
    for (var k = 0; k &lt; Results.length; k++) {
      document.getElementById("conclusion").children[0].innerHTML += "&lt;li&gt;" + Results[k] + "&lt;/li&gt;";
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input id="enter" type="text"&gt;
  &lt;input type="button" value="Enter text" onclick="DetectConcl()"&gt;
  &lt;div id="conclusion"&gt;
    &lt;ul&gt;&lt;/ul&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>