const throwdice = () => ~~(Math.random() * 6) + 1;
const throwdice = (): number => ~~(Math.random() * 6) + 1;
throwdice(); // 4throwdice(); // 1throwdice(); // 6