From d5d5cdde230e697da438f8e79b6efc2c03a47084 Mon Sep 17 00:00:00 2001 From: Geir Okkenhaug Jerstad Date: Thu, 5 Sep 2024 14:46:32 +0200 Subject: [PATCH] testing react/next.js + some builtin methods in js --- eloquentjavascript/test_script.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/eloquentjavascript/test_script.js b/eloquentjavascript/test_script.js index 1b00ea4..8878af5 100644 --- a/eloquentjavascript/test_script.js +++ b/eloquentjavascript/test_script.js @@ -25,16 +25,16 @@ for (let current = 20; ;current = current +1){ } } -// switch (prompt("What is the weather like?")) { -// case "rainy": -// console.log("Remember to bring an umbrella."); -// break; -// case "sunny": -// console.log("Dress lightly."); -// case "cloudy": -// console.log("Go outside."); -// break; -// default: -// console.log("Unknown weather type!"); -// break; -// } +switch (prompt("What is the weather like?")) { + case "rainy": + console.log("Remember to bring an umbrella."); + break; + case "sunny": + console.log("Dress lightly."); + case "cloudy": + console.log("Go outside."); + break; + default: + console.log("Unknown weather type!"); + break; + }