diff --git a/Chapter 6/Exercise 6.2 b/Chapter 6/Exercise 6.2 new file mode 100644 index 0000000..cc01504 --- /dev/null +++ b/Chapter 6/Exercise 6.2 @@ -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();