title: Simplifying IF/ELSE condition
body: <p>I want to ask how can I simplify my code? It seems hard to read and has too much if-else condition here. Any way to simplify the code?</p>
  <pre><code>if (e.shiftKey &amp;&amp; this.idx &gt; 0) {
    this.idx= this.idx - 1;
  } else if (!e.shiftKey &amp;&amp; this.idx &lt; trapFocus.length - 1) {
    this.idx = this.idx + 1;
  } else if (!e.shiftKey &amp;&amp; this.idx &lt; trapFocus.length + 1) {
    this.idx= this.idx - 2;
  } else if (e.shiftKey &amp;&amp; this.idx &gt; - 1) {
    this.idx= this.idx + 2;
  }
  </code></pre>