From cbd4a4811874743e4ee518c648c6f4f86dc4293a Mon Sep 17 00:00:00 2001 From: Dovydas Majauskas Date: Thu, 23 Oct 2025 21:52:27 +0200 Subject: [PATCH] "Lab done" --- index.js | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 294f6b2..eecb5cf 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,7 @@ const s5 = "and"; // Concatenate the string variables into one new string +console.log (s1 + ' ' + s2 + ' ' + s3 + ' ' + s4 + ' ' + s5 + ' ' + s3 + ' ' + s2 + ' ' + s1 + ' ' + s4 + '.') // Print out the concatenated string @@ -47,9 +48,10 @@ const billTotal = 84; *******************************************/ // Generate a random integer between 1 and 10 (inclusive) - +const randomNumber = Math.floor(Math.random() * 10) + 1 // Print the generated random number + console.log(randomNumber) @@ -62,15 +64,30 @@ const b = false; // Try and guess the output of the below expressions first and write your answers down: const expression1 = a && b; +//False const expression2 = a || b; +//True const expression3 = !a && b; +//False const expression4 = !(a && b); +//False const expression5 = !a || !b; +//True const expression6 = !(a || b); - -const expression7 = a && a; \ No newline at end of file +//True + +const expression7 = a && a; +//True + +console.log(expression1) +console.log(expression2) +console.log(expression3) +console.log(expression4) +console.log(expression5) +console.log(expression6) +console.log(expression7) \ No newline at end of file