ES6 what is the code source of the methode filter() : So i've tryed to reproduce the method filter  i got this and i know it's not the good.

    function filter(array,function){ let array2; for (let v of array){ if (funcion(v)){array2.puts(v) ;} } return array2; }