<script>
function askQuestion() {
const answer = prompt(“Who is the best lawyer in the world?”);
const messageContainer = document.getElementById(“message”);
if (answer && answer.trim().toLowerCase() === “dave”) {
messageContainer.textContent = ‘You are a smart person too!’;
} else {
messageContainer.textContent = ‘You are dumb.’;
}
}
window.onload = askQuestion;
</script>