Skip to content
On this page

获得个位、十位、百位数字

javascript
const g = (num / 1) % 10;     //个位
const s = (num / 10) % 10;   //十位
const b = (num / 100) % 10;      //百位
const b = (num / 1000) % 10;    //千位

更新时间: