title: How to get index based value from Set
body: <p>I am looking to store a list of unique string (hence Set) and wanted to retrieve the value based on the index. I used <strong>get(index)</strong> But it turned out it returns <strong>undefined</strong>. So it seems I did not understand Set well.</p>
  
  <p>In case value needed to be retrieved do we have to convert it back to the array and then only read it or with "<strong>get(index)</strong>" it can be achieved?</p>
  
  <p>Also, I have checked <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Set" rel="noreferrer">Set tests</a> to understand <strong>get(index)</strong> but still not clear.</p>
  
  <pre><code>const { Set } = require('immutable');
  
  const set = Set(["ab", "cd", "ef"])
  console.log(set.get(1)) //logs undefined
  console.log(set.toJS()[1]) //logs "cd"
  </code></pre>