This commit is contained in:
Karan
2021-11-25 20:26:58 +05:30
parent 1a19d738a9
commit 569d90f511
52 changed files with 0 additions and 177 deletions
+21
View File
@@ -0,0 +1,21 @@
const randomNumber = Math.floor(Math.random() * 6);
let answer = "Something went wrong";
let question = prompt("Ask me anything");
switch (randomNumber) {
case 0:
answer = "It will work out";
break;
case 1:
answer = "Maybe, maybe not";
break;
case 2:
answer = "Probably not";
break;
case 3:
answer = "Highly likely";
break;
default:
answer = "I don't know about that";
}
let output = "You asked me " + question + ". I think that " + answer;
console.log(output);