console.log("Simple Sorting Algorythym");

//array of nums that are going to be sorted through
var numArr = [9,3,1,23,91,13,1092,72]

// takes an array of numbers
function sortNum(arr){

	//Outer pass
	for(let i = 0; i < arr.length; i++){	
	    //Inner pass
	    for(let j = 0; j < arr.length - i - 1; j++){
    
		//Value comparison using ascending order
    
		if(arr[j + 1] < arr[j]){
    
		    //Swapping
		    console.log(arr);
		    [arr[j + 1],arr[j]] = [arr[j],arr[j + 1]]
		}
	    }
	};
	return arr;
    };
    
    console.log(sortNum(numArr));
Simple Sorting Algorythym
[ 9, 3, 1, 23, 91, 13, 1092, 72 ]
[ 3, 9, 1, 23, 91, 13, 1092, 72 ]
[ 3, 1, 9, 23, 91, 13, 1092, 72 ]
[ 3, 1, 9, 23, 13, 91, 1092, 72 ]
[ 3, 1, 9, 23, 13, 91, 72, 1092 ]
[ 1, 3, 9, 23, 13, 91, 72, 1092 ]
[ 1, 3, 9, 13, 23, 91, 72, 1092 ]
[ 1, 3, 9, 13, 23, 72, 91, 1092 ]