function hasZeroInCenter(number) {
// Convert the number to a string
const numStr = number.toString();
if (numStr.length % 2 === 0) {
return false; // Even length = no center digit
}
const centerIndex = Math.floor(numStr.length / 2);
return numStr.charAt(centerIndex) === '0';
}
const number = 3720961;
if (hasZeroInCenter(number)) {
console.log("yes");
} else {
console.log("no");
}
/*
run:
yes
*/