Problem 8. Write a JavaScript program to find whether a number is divisible by 2 and 3.

let num = 12;

if (((num % 2) == 0) && ((num%3) == 0))
    console.log("divisible by both");   // this will print
else if (num % 2 == 0)
    console.log("divisible by 2");
else if (num % 3 == 0)
    console.log("divisible by 3");
else
    console.log("divisible by some other number.");