📅  最后修改于: 2022-03-11 15:03:19.192000             🧑  作者: Mango
var sampleNumber = 123456789,
lastDigit = sampleNumber % 10;
console.log('The last digit of ', sampleNumber, ' is ', lastDigit);