Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sorting array

       int current = 0;
        for (int i = 0; i < array.length ; i++) {
            for (int j = i+1; j < array.length ; j++) {
                if (array[i]>array[j]) {
                    current = array[i];
                    array[i] = array[j];
                    array[j] = current;
                }
            }
        }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sorting #array
ADD COMMENT
Topic
Name
8+8 =