title: What characters are grouped with Array.from?
body: <p>I've been playing around with JS and can't figure out how JS decides which elements to add to the created array when using <code>Array.from()</code>. For example, the following emoji  has a <code>length</code> of 2, as it is made of two code points, but, <code>Array.from()</code> treats these two code points as one, giving an array with one element:</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>const emoji = '';
  console.log(Array.from(emoji)); // Output: [""]</code></pre>
  </div>
  </div>
  </p>
  
  <p>However, some other characters also have two code points such as this character <code>षि</code> (also has a <code>.length</code> of 2). However, <code>Array.from</code> doesn't "group" this character and instead produces two elements:</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>const str = 'षि';
  console.log(Array.from(str)); // Output: ["ष", "ि"]</code></pre>
  </div>
  </div>
  </p>
  
  <p>My question is: What determines whether the character is broken up (like in example two) or treated as one single element (like in example one) when the character consists of two code points?</p>