v1
7/21/2020 by hkotsubo -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
let array = [10, 4, 7, 128, 42, -1, 0, 300, -5];
let num = 400;
function buscarDivisivel(array, num){
    for (const n of array) { // só para mostrar outra forma de fazer o *loop*
        if (n % num == 0 && n != 0){
            return n;
        }
    }
    return undefined;
}
function test(n) {
	return n % num == 0 && n != 0;
}
delete caserun single casemove downdrag and drop case


ready



buscarDivisivel(array, num);
delete caserun single casemove updrag and drop case


ready



array.find(test);
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN