text: //Write a function that removes all elements with a given value
  //var arr = [1,2,1,4,1,3,4,1,111,3,2,1,'1'];
  //arr.remove(1); //arr = [2,4,3,4,111,3,2,'1'];
  //Attach it to the array type
  //Read about prototype and how to attach methods
  
  (function () {
      Array.prototype.remove = function (value) {
          var arr = this;
          for (var i = 0; i < arr.length; i += 1) {
              if (value === arr[i]) {
                  arr.splice(i, 1);
                  i -= 1;
              }
          }
          return arr;
      };
  
      var array = [1, 2, 1, 4, 1, 3, 4, 1, 111, 3, 2, 1, '1'];
  
      array.remove(1);
  
  
      for(var i=0; i<array.length; i+=1){
          console.log(array[i]);
      }
  }());