Exercise 6.2

This commit is contained in:
Karan
2021-11-24 20:50:20 +05:30
committed by GitHub
parent 6a26d8335a
commit f01f7d6c5a
+8
View File
@@ -0,0 +1,8 @@
const adj = ["super", "wonderful", "bad", "angry", "careful"];
function myFun() {
const question = prompt("What is your name?");
const nameAdj = Math.floor(Math.random() * adj.length);
console.log(adj[nameAdj] + " " + question );
}
myFun();