Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

reverse int js

function reverseInt(n) {
  const reversed = n.toString().split("").reverse().join(""); 

  return parseInt(reversed) * Math.sign(n);
}
Source by exploretech.dev #
 
PREVIOUS NEXT
Tagged: #reverse #int #js
ADD COMMENT
Topic
Name
7+4 =