text: 'use strict';
  
  function insertionSort (array){
    for(let i = 1; i < array.length; i++){
      var j = i - 1;
      let temp = array[i];
      while( (j >= 0) && (temp < array[j])){
        array[j + 1] = array[j];
        j = j-1;
      }
      array[j + 1] = temp;
    }
    return array;
  }
  
  module.exports = insertionSort;
  