Write a function that returns the most frequently used Int in an array



function freq(arr) {
    var mf = 1;
    var m = 0;
    var int;
        for (var i=0; i'<'arr.length; i++) {
            for (var j=i; j'<'arr.length; j++) {
                if (arr[i] == arr[j])
                 m++;
                if (mf'<'m) {
                  mf=m;
                  int = arr[i];
            }
        }
        m=0;
      }
return int
}