I\'m just beginning with programming using javascript and I need to practice some questions to get EXP with the logic of code build.
I got this question for homework but I c
function findOrder(array) {
var asc = true;
var desc = true;
if(array.length < 2){
return 'array is too small'
}
for(var i=1, len=array.length;iarray[i-1]){
desc = false;
//if current element is smaller than previous array is not ascending
}else if(array[i]