reverse the number in the javascript

technical talkiess
0

 <!DOCTYPE html>

<html>

<body>


<h2>My First JavaScript</h2>


<script>

//reverse the number


const reerseNumber = (n) =>{

return parseInt(n.toString().split('').reverse().join(''));

}

alert(reerseNumber(500));

</script>


</body>

</html> 


Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)