title: Slice and array after desired string
body: <p>I have an array in which I have strings, in this I want to slice the array after I get <code>&quot;test?&quot;</code>, but my logic of slicing isn't working.</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>let input = ['hello', 'choose', 'test1', 'test?', 'yes,', 'no'];
  let output = input.slice(input.indexOf('?') + 1, input.length);
  console.log(output);</code></pre>
  </div>
  </div>
  </p>
  <p>Desired Output:</p>
  <pre><code>[&quot;test?&quot;,&quot;yes&quot;]
  </code></pre>