From d3144e5fde1a1b101c8e69032efa88d8bc7f24ac Mon Sep 17 00:00:00 2001 From: Mithraldir <122308529+Mithraldir@users.noreply.github.com> Date: Sat, 12 Apr 2025 20:02:27 -0400 Subject: [PATCH] Create 6.2.4 Is it raining? --- 6.2.4 Is it raining? | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 6.2.4 Is it raining? diff --git a/6.2.4 Is it raining? b/6.2.4 Is it raining? new file mode 100644 index 0000000..b084507 --- /dev/null +++ b/6.2.4 Is it raining? @@ -0,0 +1,17 @@ +function main() { + console.log("Do I need a raincoat?"); + + //create a variable that stores whether or not it is raining + //use the Randomizer to assign a random Boolean value + let raining = Randomizer.nextBoolean(); + //print the value of your variable to the console + console.log("Is it raining? " + raining); + //use an if/else statement to print out if you need a raincoat + if (raining == true) { + console.log("Yes"); + } else { + console.log("No"); + } +} + +main();