Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

extract the last number of two digits number js

var sampleNumber = 123456789,
  lastDigit = sampleNumber % 10;
console.log('The last digit of ', sampleNumber, ' is ', lastDigit);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #extract #number #digits #number #js
ADD COMMENT
Topic
Name
4+2 =