title: How to check string contains substring in javascript
body: <p>I have strings as below, I am search text order in all variables but I want to return true for <code>string2</code> and <code>string3</code> but for <code>string1</code> should be false.</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>var string1 = "orders"
  var string2 = "orders/pack"
  var string3 = "orders/123"
  var str = "order"
  console.log(string1.includes(str)); //false 
  console.log(string2.includes(str)); //true
  console.log(string3.includes(str)); //true</code></pre>
  </div>
  </div>
  </p>