2 -23 编程练习
来源:2-23 编程练习
目訫
2018-09-10 21:48:39
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>数组排序</title> </head> <body> <script> var input; var arr=[ ]; while(input!="-1"){ input=Number(prompt("请输入您想排序的数字")); arr.push(input);//补充代码 } arr.pop();//补充代码 arr.sort(function(a,b) {return b - a;}); //补充代码 document.write(arr); </script> </body> </html>
1回答
效果实现了呢 ,棒棒哒 ! 祝学习愉快 .
相似问题