console.log(Freq([3, '3', '3', 'a', 2, 3, 'a', 3, 'a', 2, 4, 9, 3]));
function Freq(arr1)
{
var count = 1;
var m = 0;
var x;
for (var i=0; i<arr1.length; i++)
{
for (var j=i; j<arr1.length; j++)
{
if (arr1[i] == arr1[j])
m++;
if (count<m)
{
count=m;
x = arr1[i];
}
}
m=0;
}
return x +' From Array which comes'+' '+count+' '+'times';
}
To embed this program on your website, copy the following code and paste it into your website's HTML: