Function to check if the numbers formed by combining first and last digits generates a prime number or not
function isAnyPrime ( first , last ) { var num1 = first * 10 + last ; var num2 = last * 10 + first ;