<html> <head> <script language="javascript"> function bubble() { var a=new array(); var b=new array(); var temp; b=prompt("enter values","0"); a=b.split(","); for(i=0;i<=9;i++) { for(j=i+1;j<=9;j++) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } for(i=0;i<=9;i++) { alert(a[i]); } } bubble(); </script> </head> </html>
if(a[j]>a[j+1]) { temp=a[j+1]; a[j+1]=a[j]; a[j]=temp; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)