<p dir="auto">Challenge <a href="http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life" rel="nofollow">http://freecodecamp.com/challenges/waypoint-bring-your-javascript-slot-machine-to-life</a> has an issue. Please describe how to reproduce it, and include links to screenshots if possible.</p>
<p dir="auto">In typing this suggested code to solve the challenge, the automatic closing of parentheses leads the student to type</p>
<p dir="auto"><math-renderer class="js-inline-math" style="display: inline" data-static-url="https://github.githubassets.com/static" data-run-id="f033b59ddba7a744f8bc10b50cd79ddb">$($</math-renderer>)</p>
<p dir="auto">which immediately causes the script to become unresponsive. This is on Firefox for Mac v39.0.3</p>
<p dir="auto">Challenge <a href="https://www.freecodecamp.com/challenges/record-collection#?solution=%0A%2F%2F%20Setup%0Avar%20collection%20%3D%20%7B%0A%20%20%20%202548%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%22Slippery%20When%20Wet%22%2C%0A%20%20%20%20%20%20artist%3A%20%22Bon%20Jovi%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%0A%20%20%20%20%20%20%20%20%22Let%20It%20Rock%22%2C%20%0A%20%20%20%20%20%20%20%20%22You%20Give%20Love%20a%20Bad%20Name%22%20%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%202468%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%221999%22%2C%0A%20%20%20%20%20%20artist%3A%20%22Prince%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%0A%20%20%20%20%20%20%20%20%221999%22%2C%20%0A%20%20%20%20%20%20%20%20%22Little%20Red%20Corvette%22%20%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%201245%3A%20%7B%0A%20%20%20%20%20%20artist%3A%20%22Robert%20Palmer%22%2C%0A%20%20%20%20%20%20tracks%3A%20%5B%20%5D%0A%20%20%20%20%7D%2C%0A%20%20%20%205439%3A%20%7B%0A%20%20%20%20%20%20album%3A%20%22ABBA%20Gold%22%0A%20%20%20%20%7D%0A%7D%3B%0A%2F%2F%20Keep%20a%20copy%20of%20the%20collection%20for%20tests%0Avar%20collectionCopy%20%3D%20JSON.parse%28JSON.stringify%28collection%29%29%3B%0A%0A%2F%2F%20Only%20change%20code%20below%20this%20line%0A%0Afunction%20updateRecords%28id%2C%20prop%2C%20value%29%20%7B%0A%20%20if%20%28value%20!%3D%3D%20%22%22%20%26%26%20prop%20!%3D%3D%20%22tracks%22%29%20%7B%0A%20%20%20%20collection%5Bid%5D%5Bprop%5D%20%3D%20value%3B%0A%20%20%7D%20else%20if%20%28prop%20%3D%3D%3D%20%22tracks%22%20%26%26%20value%20!%3D%3D%20%22%22%29%20%7B%0A%20%20%20%20%2F*if%28collection%5Bid%5D.hasOwnProperty%28prop%29%29%0A%20%20%20%20%20%20collection%5Bid%5D%5Bprop%5D.push%28value%29%3B%0A%20%20%20%20else%0A%20%20%20%20%20%20collection%5Bid%5D%5Bprop%5D%3D%5Bvalue%5D%3B%0A%20%20%20%20%2F%2Fcollection%5Bid%5D%5Bprop%5D.push%28value%29%3B*%2F%0A%20%20%20%20collection%5Bid%5D%5Bprop%5D%3D%5Bvalue%5D%3B%0A%20%20%7D%20else%20if%20%28value%20%3D%3D%3D%20%22%22%29%20%7B%0A%20%20%20delete%20collection%5Bid%5D%5Bprop%5D%3B%0A%20%20%7D%0A%0A%20%20return%20collection%3B%0A%7D%0A%0A%0A%0A%2F%2F%20Alter%20values%20below%20to%20test%20your%20code%0AupdateRecords%282548%2C%20%22tracks%22%2C%20%22ABBA%22%29%3B%0A%0A" rel="nofollow">Record Collection</a> has an issue.<br>
User Agent is: <code class="notranslate">Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36</code>.<br>
Please describe how to reproduce this issue, and include links to screenshots if possible.</p>
<p dir="auto">Instructions in description text:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="For the given id in collection:

If prop does not contain the key &quot;tracks&quot;, then update or set the value for that incomplete prop.

If prop does not contain the key &quot;tracks&quot; before you update it, create an empty array before pushing a track to it.

If prop does contain the key &quot;tracks&quot; and its value is non-blank, then push the value onto the end of its existing tracks array.

If value is blank, delete that prop."><pre class="notranslate"><span class="pl-v">For</span> <span class="pl-s1">the</span> <span class="pl-s1">given</span> <span class="pl-s1">id</span> <span class="pl-k">in</span> <span class="pl-s1">collection</span>:

<span class="pl-v">If</span> <span class="pl-s1">prop</span> <span class="pl-s1">does</span> <span class="pl-s1">not</span> <span class="pl-s1">contain</span> <span class="pl-s1">the</span> <span class="pl-s1">key</span> <span class="pl-s">"tracks"</span><span class="pl-kos">,</span> <span class="pl-s1">then</span> <span class="pl-s1">update</span> <span class="pl-s1">or</span> <span class="pl-k">set</span> <span class="pl-s1">the</span> <span class="pl-s1">value</span> <span class="pl-s1">for</span> <span class="pl-s1">that</span> <span class="pl-s1">incomplete</span> <span class="pl-s1">prop</span><span class="pl-kos">.</span>

<span class="pl-c1">If</span> <span class="pl-s1">prop</span> <span class="pl-s1">does</span> <span class="pl-s1">not</span> <span class="pl-s1">contain</span> <span class="pl-s1">the</span> <span class="pl-s1">key</span> <span class="pl-s">"tracks"</span> <span class="pl-s1">before</span> <span class="pl-s1">you</span> <span class="pl-s1">update</span> <span class="pl-s1">it</span><span class="pl-kos">,</span> <span class="pl-s1">create</span> <span class="pl-s1">an</span> <span class="pl-s1">empty</span> <span class="pl-s1">array</span> <span class="pl-s1">before</span> <span class="pl-s1">pushing</span> <span class="pl-s1">a</span> <span class="pl-s1">track</span> <span class="pl-s1">to</span> <span class="pl-s1">it</span><span class="pl-kos">.</span>

<span class="pl-c1">If</span> <span class="pl-s1">prop</span> <span class="pl-s1">does</span> <span class="pl-s1">contain</span> <span class="pl-s1">the</span> <span class="pl-s1">key</span> <span class="pl-s">"tracks"</span> <span class="pl-s1">and</span> <span class="pl-s1">its</span> <span class="pl-s1">value</span> <span class="pl-s1">is</span> <span class="pl-s1">non</span><span class="pl-c1">-</span><span class="pl-s1">blank</span><span class="pl-kos">,</span> <span class="pl-s1">then</span> <span class="pl-s1">push</span> <span class="pl-s1">the</span> <span class="pl-s1">value</span> <span class="pl-s1">onto</span> <span class="pl-s1">the</span> <span class="pl-s1">end</span> <span class="pl-s1">of</span> <span class="pl-s1">its</span> <span class="pl-s1">existing</span> <span class="pl-s1">tracks</span> <span class="pl-s1">array</span><span class="pl-kos">.</span>

<span class="pl-c1">If</span> <span class="pl-s1">value</span> <span class="pl-s1">is</span> <span class="pl-s1">blank</span><span class="pl-kos">,</span> <span class="pl-k">delete</span> <span class="pl-s1">that</span> <span class="pl-s1">prop</span><span class="pl-kos">.</span></pre></div>
<p dir="auto">Its just a sugesstion because your instructions (specially 3rd line) are confusing a lot of people .<br>
So I think you should change it .<br>
Your third line should be something like <code class="notranslate">If the concerned object does not contain the key "tracks" ,then update it by creating an empty array before pushing a track to it.</code><br>
because you only want to update when prop contains the value key but the concerned object doesn't have the tracks property.</p>