
Write a javascript code to,(numerically)

Hello Friend,
Try this:
<html>
<Script>
var arrsize=window.prompt("Enter size of array: ");
var arr=new Array
for(var i=0;i<arrsize;i++){
var j=i+1;
var element=window.prompt("Enter element "+j);
arr[i]=element;
}
document.writeln("<b>Array Elements</b><br>");
for(var i=0;i<arr.length;i++){
document.writeln(arr[i]);
}
document.writeln("<br>");
document.writeln("<b>Array Reverse</b><br>");
for(var i=arr.length-1;i>=0;i--){
document.writeln(arr[i]);
}
</script>
</html>
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.