function swap(first, second, arrayVal) {
var temp = arrayVal[first];
arrayVal[first] = arrayVal[second];
arrayVal[second] = temp;
}
function printArray(sorting, arrayVal) {
var div = document.getElementById("mySorting");
div.innerHTML += sorting + " [" + arrayVal + "]<br/>"; //innerHTML usage = needed to write contents(text) into HTML element
function callSorting() {
bubbleSort();
insertionSort();
selectionSort();
var h2 = document.getElementById("msg");
h2.innerHTML = "GOOOOD, NO MORE RUN-TIME BUGS!!! MAKE SURE YOUR NUMBERS ARE SORTED THOUGH ... ;-)";
}
window.onerror = function(err, file, line) {
var p = document.getElementById("mess");
p.innerHTML = 'The following error occured: <br/>' + err + '<br/>' +
'At line: ' + line;
return true;
}