Bubble sort examination
As @Zeta said, only your examiner can tell you why he wasn't satisfied.
But here are a couple of suggestions anyway:


Variable names are important and myArray doesn't mean much. You can try inputArray for example.
Changing the index of a for loop is usually not a good idea, because it makes the code a bit more difficult to understand (not by a lot, but why make it harder?).


This is another go at the same algorithm, which I think is more readable:

function bubbleSort(inputArray)
{
  var index;
  var done = false;
  var temp;

  while ( !done )
  {
    done = true;
    for(var index = 0; index &lt; inputArray.length; index++)
    {
      if ( inputArray[index] &gt; inputArray[index+1] )
      {
        temp = inputArray[ index ];
        inputArray[ index ] = inputArray[ index+1 ];
        inputArray[ index+1 ] = temp;
        done = false;
      }
    }
  }

  return inputArray;
}