JavaScript program to check if two numbers have the same last digit:
let firstNumber = parseInt(prompt("Enter the first number:"));
let secondNumber = parseInt(prompt("Enter the second number:"));
if (firstNumber % 10 === secondNumber % 10) {
console.log("The numbers have the same last digit.");
} else {
console.log("The numbers do not have the same last digit.");
}