Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to reverse number in javascript

// how to reverse number in javascript
let number = 12345;
let reverse = parseInt(number.toString().split('').reverse().join(''));
console.log(reverse);
// Output:
// 54321
 
PREVIOUS NEXT
Tagged: #reverse #number #javascript
ADD COMMENT
Topic
Name
3+4 =