1my_list = [-15, -26, 15, 1, 23, -64, 23, 76]
2new_list = []
3
4while my_list:
5 min = my_list[0]
6 for x in my_list:
7 if x < min:
8 min = x
9 new_list.append(min)
10 my_list.remove(min)
11
12print(new_list)
1double prod(double #1,int #2){ double result= 1; for(int i = 0;i<length;i++){ result = result * array[i]; } return result;}
1// An array in javascript is basicly a data structure set out like this:
2const MyArray = {"Object1", "Object2", "Object3"};
1// sorting an array of strings
2var names = ["Adam", "Jeffrey", "Fabiano", "Danil", "Ben"];
3
4// returns the sorted array
5console.log(names.sort());
6
7// modifies the array in place
8console.log(names);
9
10var priceList = [1000, 50, 2, 7, 14];
11priceList.sort();
12
13// Number is converted to string and sorted
14console.log(priceList)
1int[] spam = new int[] { 1, 2, 3 };
2Arrays.stream(spam)
3 .boxed()
4 .collect(Collectors.toList());
5
1<!DOCTYPE html>
2<html>
3 <body>
4 <script>
5 var str = ["1818-15-3", "1819-16-3"];
6 var arr = str.split(":");
7
8 document.write(arr[1] + ":" + arr[2]);
9 </script>
10 </body>
11</html>