I am having some interesting issues here. ive put my screen shots in blur

I am having some interesting issues here. ive put my screen shots in blur
0

#1

I’m getting the correct results(or am I?) but its saying I failed. this has happened on 2 separate puzzles now. what am I missing? or do I just have the magic touch to find bugs? HA HA.
ps
if I copy and paste the solutions from the hints they work flawlessly

This text will be blurred




#2

pps
I created a flatten function thinking it didn’t like recursion some how, so I created an external function not called steamRollArray to trick it.


#3

Your code contains global variables that are changed each time the function is run. This means that after each test completes, subsequent tests start with the new value. To fix this, make sure your function doesn’t change any global variables, and declare/assign variables within the function if they need to be changed.

Example:

var myGlobal = [1];
function returnGlobal(arg) {
  myGlobal.push(arg);
  return myGlobal;
} // unreliable - array gets longer each time the function is run

function returnLocal(arg) {
  var myLocal = [1];
  myLocal.push(arg);
  return myLocal;
} // reliable - always returns an array of length 2

In the future, please include actual code instead of screenshots. You can format code pasted into the forum or you can link to a Gist, Repl, CodePen, etc.