function btnClick()
{
s1=""; s2="";
var mas=["кот",123,"рыба",4.56,"лев",-71,"варан",9,"сова",123.456];
for (i=0; i
s1 = s1+mas[i]+" ";
if (mas[i]*1 == mas[i]) s2 = s2+mas[i]+" ";
};
document.frm.res1.value=s1;
document.frm.res2.value=s2;
}
onClick="btnClick();">
Массив:
Результат: