My Smallest Common Multiple can run and pass all tests elsewhere but for the FCC it fails the last test...Can some one point to me why?

Tell us what’s happening:

Your code so far


function smallestCommons(arr) {
	var numArr=[];
	if(arr[0]>arr[arr.length-1]){
		for(var k=arr[0]; k>=arr[arr.length-1]; k--){
			numArr.push(k);
		}
	}else{
	for (var i=1; i<=arr[arr.length-1]; i++){
		numArr.push(i);
	}
	}


var j=numArr[numArr.length-1]+1;
var found = false;
while(found===false){
	if(numArr.every(commonSmall)){
		found=true;
}else j=j+1;
}
;

function commonSmall(currentvalue){
return j%currentvalue ===0;
}
return j
}
smallestCommons([1,5]);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/smallest-common-multiple/

add a console.log(j) just before the final return statement. You’re returning the wrong values.