programming-examples/js/Functions/Write a JavaScript function that reverse a number..js

6 lines
145 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
function reverse_a_number(n)
{
n = n + "";
return n.split("").reverse().join("");
}
console.log(reverse_a_number(32243));