Create ex4

This commit is contained in:
LSvekis 2021-06-28 17:03:45 -04:00 committed by GitHub
parent 3985643e28
commit 54c7b50640
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

15
chapter 6/ex4 Normal file
View File

@ -0,0 +1,15 @@
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();