if (answer == "paris" || "Paris" || "PARIS"){
should be
if ((answer =="paris") || (answer == "Paris") || answer == "PARIS")) {
But that still does not cover PaRiS etc.
Code:
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function capitalCity() {
var answer = prompt("What is the capital city of France?","");
answer = answer.toLowerCase();
// it would be a good idea to strip leading and/or trailing spaces here!
if (answer == "paris") {
alert ("You are correct");
}
else {
alert ("You are incorrect");
}
}
capitalCity();
</script>
</head>
<body>
</body>
</html>
Be aware that both prompt() and alert() are nowadays considered obsolete, and they should only be used for testing purposes.
Also be aware that the user can discover the correct answer simply with View Source in his browser.