<p dir="auto">As of now, all solutions to bonfires are saved to your profile instead of just the most recent one, which is great; it does, however, clutter up your profile, especially if you play around in the same bonfire a lot, adding stuff and testing it over and over. Could solutions to the same bonfire be stored in some sort of openable menu, so that each bonfire only appears on your profile once? Maybe the solutions part of the profile could look like the Map page and clicking the bonfire would show the solutions?</p>
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/sorted-union#?solution=%0Afunction%20uniteUnique%28arr%29%20%7B%0A%20%20%0A%20%20%0A%20%20var%20joinedArray%20%3D%20%5B%5D%3B%0A%20%20%0A%20%20var%20newArray%20%3D%20%5B%5D%3B%0A%20%20%0A%20%20var%20finalArray%20%3D%20%5B%5D%3B%0A%20%20%0A%20%20%0A%20%20for%20%28i%20%3D%200%3B%20i%20%3C%20arguments.length%3B%20i%2B%2B%29%20%7B%0A%20%20%20%20%0A%20%20%20%20%20%20var%20joined%20%3D%20arguments%5Bi%5D.join%28%22%22%29%3B%0A%20%20%20%20%20%20joinedArray.push%28joined%29%3B%0A%20%20%7D%0A%20%20%0A%20%20joinedArray%20%3D%20joinedArray.join%28%22%22%29%3B%0A%20%20joinedArray%20%3D%20joinedArray.split%28%22%22%29%3B%0A%20%20%0A%20%20%0A%20%20for%20%28z%20%3D%200%3B%20z%20%3C%20joinedArray.length%3B%20z%2B%2B%29%20%7B%0A%20%20%20%20%0A%20%20%20%20%20%20if%20%28z%20%3D%3D%3D%200%29%20%7B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20newArray.push%28joinedArray%5Bz%5D%29%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%0A%20%20%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20var%20match%20%3D%20%22no%22%3B%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20for%20%28h%20%3D%200%3B%20h%20%3C%20newArray.length%3B%20h%2B%2B%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20if%20%28joinedArray%5Bz%5D%20%3D%3D%20newArray%5Bh%5D%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20match%20%3D%20%22yes%22%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20if%20%28match%20%3D%3D%20%22no%22%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20newArray.push%28joinedArray%5Bz%5D%29%3B%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%7D%0A%20%20%0A%20%20%20%0A%20%20for%20%28q%20%3D%200%3B%20q%20%3C%20newArray.length%3B%20q%2B%2B%29%20%7B%0A%20%20%20%20%0A%20%20%20%20%20%20var%20numberized%20%3D%20Number%28newArray%5Bq%5D%29%3B%0A%20%20%20%20%0A%20%20%20%20%20%20finalArray.push%28numberized%29%3B%0A%20%20%7D%0A%20%20%0A%0A%20%20%0A%20%20%0A%20%20return%20finalArray%3B%0A%7D%0A%0A%0A%0AuniteUnique%28%5B1%2C%203%2C%202%5D%2C%20%5B1%2C%20%5B5%5D%5D%2C%20%5B2%2C%20%5B4%5D%5D%29%3B%0A" rel="nofollow">Sorted Union</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">My code:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="
// So my code passes 3 of 4 assertion tests but not one of them. 

// Here it is: uniteUnique([1, 3, 2], [1, [5]], [2, [4]]) should return [1, 3, 2, [5], [4]].

// My code returns: [1,3,2,5,4]. It's the same but without the numbers 5 and 4 in an array.

// This is what it says in the instructions: 

//&quot;Write a function that takes two or more arrays and returns 
//a new array of unique values in the order of the original provided arrays.&quot;

//&quot;In other words, all values present from all arrays should
 //be included in their original order, but with no duplicates in the final array.&quot;

//&quot;The unique numbers should be sorted by their original order, 
//but the final array should not be sorted in numerical order.&quot;

// My code returns what the instructions says it should return 
//and does away with the array surrounding some of the values. 

// Also, given that: 

//var word;

 // if ([5] == 5) {

  // word = &quot;bird&quot;;
  //}

//...evaluates to true, meaning 5 is the same as [5], shouldn't my
//code's output for the assertion test in //question be accepted? 

// **Thank you for your time and help in advance!**




function uniteUnique(arr) {


  var joinedArray = [];

  var newArray = [];

  var finalArray = [];


  for (i = 0; i &lt; arguments.length; i++) {

      var joined = arguments[i].join(&quot;&quot;);
      joinedArray.push(joined);
  }

  joinedArray = joinedArray.join(&quot;&quot;);
  joinedArray = joinedArray.split(&quot;&quot;);


  for (z = 0; z &lt; joinedArray.length; z++) {

      if (z === 0) {

          newArray.push(joinedArray[z]);
      }

      else {

          var match = &quot;no&quot;;

          for (h = 0; h &lt; newArray.length; h++) {

              if (joinedArray[z] == newArray[h]) {

                  match = &quot;yes&quot;;
              }
          }

          if (match == &quot;no&quot;) {

              newArray.push(joinedArray[z]);
          }
      }
  }


  for (q = 0; q &lt; newArray.length; q++) {

      var numberized = Number(newArray[q]);

      finalArray.push(numberized);
  }




  return finalArray;
}



uniteUnique([1, 3, 2], [1, [5]], [2, [4]]);
"><pre class="notranslate"><span class="pl-c">// So my code passes 3 of 4 assertion tests but not one of them. </span>

<span class="pl-c">// Here it is: uniteUnique([1, 3, 2], [1, [5]], [2, [4]]) should return [1, 3, 2, [5], [4]].</span>

<span class="pl-c">// My code returns: [1,3,2,5,4]. It's the same but without the numbers 5 and 4 in an array.</span>

<span class="pl-c">// This is what it says in the instructions: </span>

<span class="pl-c">//"Write a function that takes two or more arrays and returns </span>
<span class="pl-c">//a new array of unique values in the order of the original provided arrays."</span>

<span class="pl-c">//"In other words, all values present from all arrays should</span>
 <span class="pl-c">//be included in their original order, but with no duplicates in the final array."</span>

<span class="pl-c">//"The unique numbers should be sorted by their original order, </span>
<span class="pl-c">//but the final array should not be sorted in numerical order."</span>

<span class="pl-c">// My code returns what the instructions says it should return </span>
<span class="pl-c">//and does away with the array surrounding some of the values. </span>

<span class="pl-c">// Also, given that: </span>

<span class="pl-c">//var word;</span>

 <span class="pl-c">// if ([5] == 5) {</span>

  <span class="pl-c">// word = "bird";</span>
  <span class="pl-c">//}</span>

<span class="pl-c">//...evaluates to true, meaning 5 is the same as [5], shouldn't my</span>
<span class="pl-c">//code's output for the assertion test in //question be accepted? </span>

<span class="pl-c">// **Thank you for your time and help in advance!**</span>




<span class="pl-k">function</span> <span class="pl-en">uniteUnique</span><span class="pl-kos">(</span><span class="pl-s1">arr</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>


  <span class="pl-k">var</span> <span class="pl-s1">joinedArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

  <span class="pl-k">var</span> <span class="pl-s1">newArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>

  <span class="pl-k">var</span> <span class="pl-s1">finalArray</span> <span class="pl-c1">=</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">;</span>


  <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">i</span> <span class="pl-c1">&lt;</span> <span class="pl-smi">arguments</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">i</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>

      <span class="pl-k">var</span> <span class="pl-s1">joined</span> <span class="pl-c1">=</span> <span class="pl-smi">arguments</span><span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-s1">joinedArray</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">joined</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>

  <span class="pl-s1">joinedArray</span> <span class="pl-c1">=</span> <span class="pl-s1">joinedArray</span><span class="pl-kos">.</span><span class="pl-en">join</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-s1">joinedArray</span> <span class="pl-c1">=</span> <span class="pl-s1">joinedArray</span><span class="pl-kos">.</span><span class="pl-en">split</span><span class="pl-kos">(</span><span class="pl-s">""</span><span class="pl-kos">)</span><span class="pl-kos">;</span>


  <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">z</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">joinedArray</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">z</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>

      <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">z</span> <span class="pl-c1">===</span> <span class="pl-c1">0</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>

          <span class="pl-s1">newArray</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">joinedArray</span><span class="pl-kos">[</span><span class="pl-s1">z</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span>

      <span class="pl-k">else</span> <span class="pl-kos">{</span>

          <span class="pl-k">var</span> <span class="pl-s1">match</span> <span class="pl-c1">=</span> <span class="pl-s">"no"</span><span class="pl-kos">;</span>

          <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">h</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">h</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">newArray</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">h</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>

              <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">joinedArray</span><span class="pl-kos">[</span><span class="pl-s1">z</span><span class="pl-kos">]</span> <span class="pl-c1">==</span> <span class="pl-s1">newArray</span><span class="pl-kos">[</span><span class="pl-s1">h</span><span class="pl-kos">]</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>

                  <span class="pl-s1">match</span> <span class="pl-c1">=</span> <span class="pl-s">"yes"</span><span class="pl-kos">;</span>
              <span class="pl-kos">}</span>
          <span class="pl-kos">}</span>

          <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">match</span> <span class="pl-c1">==</span> <span class="pl-s">"no"</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>

              <span class="pl-s1">newArray</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">joinedArray</span><span class="pl-kos">[</span><span class="pl-s1">z</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
          <span class="pl-kos">}</span>
      <span class="pl-kos">}</span>
  <span class="pl-kos">}</span>


  <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-s1">q</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span> <span class="pl-s1">q</span> <span class="pl-c1">&lt;</span> <span class="pl-s1">newArray</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">;</span> <span class="pl-s1">q</span><span class="pl-c1">++</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>

      <span class="pl-k">var</span> <span class="pl-s1">numberized</span> <span class="pl-c1">=</span> <span class="pl-v">Number</span><span class="pl-kos">(</span><span class="pl-s1">newArray</span><span class="pl-kos">[</span><span class="pl-s1">q</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

      <span class="pl-s1">finalArray</span><span class="pl-kos">.</span><span class="pl-en">push</span><span class="pl-kos">(</span><span class="pl-s1">numberized</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>




  <span class="pl-k">return</span> <span class="pl-s1">finalArray</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>



<span class="pl-en">uniteUnique</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">3</span><span class="pl-kos">,</span> <span class="pl-c1">2</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-c1">5</span><span class="pl-kos">]</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-c1">2</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-c1">4</span><span class="pl-kos">]</span><span class="pl-kos">]</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>