Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse a number in javascript

const num = 3849;

function reverseGivenInteger(num) {
    return Number(String(num).split('').reverse().join(''))
}

console.log(`Reversed integer is: ${reverseGivenInteger(num)}`)
Source by www.codevscolor.com #
 
PREVIOUS NEXT
Tagged: #reverse #number #javascript
ADD COMMENT
Topic
Name
6+3 =