const removeFromArray = function(array, ...remove) {
    remove.forEach(element => {
        let findIndexElement = array.findIndex(x => x == element);
        let saveArray = [];
        for (let i = 0; i < array.length - findIndexElement; i++) {
            saveArray.push(array.pop());
        }
        array.pop();
        for (let i = 0; i < saveArray.length; i++) {
            array.push(saveArray[i]);
        } 
    });
    return array;
};


// Do not edit below this line
module.exports = removeFromArray;
