From c6ab0244aa18f8f8e93efa6417d4d541e789df1b Mon Sep 17 00:00:00 2001 From: Jaume Barriuso Date: Wed, 18 Feb 2026 16:54:07 +0100 Subject: [PATCH 1/2] Tarea realizada Jaume --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 294f6b2..fbbe0e6 100644 --- a/index.js +++ b/index.js @@ -8,10 +8,10 @@ const s4 = "bread"; const s5 = "and"; // Concatenate the string variables into one new string - +const nombres = s1 + s2 + s3 + s4 + s5; // Print out the concatenated string - +console.log(nombres); From 900736068231d6cf4bb312e3567210ca48fa954d Mon Sep 17 00:00:00 2001 From: Jaume Barriuso Date: Wed, 18 Feb 2026 17:09:24 +0100 Subject: [PATCH 2/2] tarea guardada --- index.js | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/index.js b/index.js index fbbe0e6..0e9e5f6 100644 --- a/index.js +++ b/index.js @@ -22,10 +22,10 @@ const part1 = "java"; const part2 = "script"; // Convert the last letter of part1 and part2 to uppercase and concatenate the strings - +const part3 = part1.slice(0, 3) + part1[3].toUpperCase()+ part2.slice(0, 5) + part2[5].toUpperCase() // Print the cameLtaiL-formatted string - +console.log(part3); @@ -35,10 +35,12 @@ const part2 = "script"; const billTotal = 84; // Calculate the tip (15% of the bill total) +const tip = 0.15; +const billtip = billTotal + billTotal * tip; // Print out the tipAmount - +console.log(billtip); @@ -47,10 +49,10 @@ const billTotal = 84; *******************************************/ // Generate a random integer between 1 and 10 (inclusive) - +const random = Math.random() * 9 + 1; // Print the generated random number - +console.log(random); /******************************************* @@ -62,15 +64,16 @@ 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); - +"true" const expression5 = !a || !b; - +"true" const expression6 = !(a || b); - -const expression7 = a && a; \ No newline at end of file +"false" +const expression7 = a && a; +"true" \ No newline at end of file