#JavaScriptSolved : Check whether two given integers are similar or not

Write a JavaScript program to check whether two given integers are similar or not, if a given divisor divides both integers and it does not divide either.

function checking_numbers(x, y, divisor) {

if(x % divisor === 0 && y % divisor === 0 || x % divisor !== 0 && y % divisor !==

0) {

return true;

}

return false;

}

console.log(checking_numbers(10, 25, 5));

console.log(checking_numbers(10, 20, 5));

console.log(checking_numbers(10, 20, 4));

اللهم صل على محمد وآل محمد
(Allahumma salli ‘ala Muhammad wa ali Muhammad)
سُبْحَانَ اللّهِ وَ بِحَمْدِهِ ، سُبْحَانَ اللّهِ الْعَظِيمِ
(SubhanAllahi wa biHamdihi, SubhanAllahil adzim)
سبحانك اللهم وبحمدك أشهد ان لا إله إلا أنت أستغفرك وآتوب إليك
(Subhanakallahumma wabihamdika asyhadu allaailaaha illa anta astaghfiruka wa atuubu ilaika)

--

--

#ActionPills | Shawal 🇵🇸

Sharing weekly #ActionPills for both of you and ME. Let's consume and apply this 'actionable pills' in our daily life ^^ > https://taplink.cc/actionpills <