function solution(arr, divisor) {
var answer = [];
let sorted = arr.sort(function(a,b){
return a-b
});
for(let i=0; i < sorted.length; i++) {
if(sorted[i] % divisor === 0) {
answer.push(sorted[i]);
}
}
if(answer.length !== 0) {
return answer;
} else {
return [-1];
}
}
function solution(s) {
let count = 0;
for(let i=0; i<s.length; i++) {
if(typeof Number(s[i]) === "number") {
count++
}
}
if(count === s.length) {
return true;
} else {
return false;
}
}
function solution(s) {
var answer = true;
if(s.length === 4 || s.length === 6) {
for(let i=0; i<s.length; i++) {
if(typeof Number(s[i]) === "number") {
answer = true
} else {
answer = false
}
}
}
return answer
}
function solution(s) {
var answer;
if(s.length === 4 || s.length === 6) {
if(Number(s)) {
answer = true;
} else {
answer = false;
}
} else {
answer = false;
}
return answer
}