Below is my source code to reverse (as in mirror) the given number. I need to reverse the number using reverse method of arrays.
var a = prompt(\"Enter a va
Using the JavaScript reverse() array method you can reverse the order of the array elements.
reverse()
var a = prompt("Enter a value"); var arr = []; for (var i = 0; i < a.length; i++) { arr[i] = a.charAt(i); } arr.reverse(); alert(arr);