title: Create encoder on js
body: <p>I'm learning JavaScript on my own and have some experience in Java and Python.<br>
  I want to create an encoder that works with 2 sets of alphabets and has a mapping from one to another.<br>
  for example:   </p>
  
  <pre><code>Set1 = (א,ב,ג,ד) Set2 = (ا,ب,ج,د)  
  א --&gt; ا  
  ב --&gt; ب  
  ג --&gt; ج  
  ד --&gt; د  
  </code></pre>
  
  <p>With java and python it makes sense to work with hashmaps but I'm trying to find some easy and elegant way to create this mapping in JS. I tried working with arrays and indexes but it didn't go so well...<br>
  Thanks :)</p>