JavaScript is a server client side language. And JavaScript is a general purpose programming language and class based programming language and object orientade programming language You can make animation and web application etc
<!Doctype>
<html>
<head>
<title>
Reverse number program
</title>
</head>
<body>
<h1>Reverse number </h1>
</body>
</html>
function reversenber(n)
{
n = n + " ";
return n.split(" ").reverse().join(" ");
}
console.log(reversenumber);
Input number is: 215687
This is Output: 786512
split() Split method is used to split a String object, into an array of strings by separating the string into substrings.
console.log([1234]);
Output:[ "1", "2", "3", "4"]
reverse() Reverse method is used to reverse an array in place.
console.log([ "1", "2", "3", "4"]);
Output:[ "4", "3", "2", "1"]
join() Join method is used to join all elements of an array into a string.
console.log( ["4", "3", "2", "1"]);
Output: 4321