0601Name_Not_Found垢版 | 大砲2015/01/21(水) 21:05:52.23ID:??? あ、すいません var a = [1,2,3,4,5,6,7,8,9,10]; var b = []; for (var i=0; i<10; i++) { if (a[i] % 2) { b.push(a[i]); } } console.log(b[Math.floor(Math.random()*b.length)])