has same rightn most digit

 s

function hasSameRightmostDigit(num1, num2,num3) {
  // Get the rightmost digits of the two numbers.
  const rightmostDigit1 = num1 % 10;
  const rightmostDigit2 = num2 % 10;
    const rightmostDigit3 = num3 % 10;

  // Return true if the rightmost digits are the same, false otherwise.
  return rightmostDigit1 === rightmostDigit2 && rightmostDigit2 === rightmostDigit3;
}
console.log(hasSameRightmostDigit(12,22,22));
</script>

s

No comments:

Post a Comment

create cartoon video using ai

  https://www.piclumen.com/ using this we can crate cartoon photos https://hailuoai.video/ its not free upto 1000 points we canuse it for fr...