SOURCE

console 命令行工具 X clear

                    
>
console
function dm() {
  let names = ['甲', '乙', '丙', '丁'];
  let index = Math.floor(Math.random() * 4);
  alert('被选中的同学是:' + names[index]);
}

document.getElementById('tet')
<button id="test">
  点名
</button>