Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 29 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ const s3 = "Ted";
const s4 = "bread";
const s5 = "and";

const tongueTwister = s1 + " " + s2 + " " + s3 + " " + s4 + " " +
s5 +" "+
s3 + " " + s2 + " " + s1 + " " + s4;

console.log(tongueTwister);


// Concatenate the string variables into one new string


Expand All @@ -16,11 +23,18 @@ const s5 = "and";


/*******************************************
Iteration 1.2 | Camel Tail
Iteration 1.2 | Camel Tail
*******************************************/
const part1 = "java";
const part2 = "script";

const part1Up = part1.slice(0, 3) + part1.slice(3).toUpperCase();
const part2Up = part2.slice(0, 5) + part2.slice(5).toUpperCase();
const result = part1Up + part2Up;
console.log(result);



// Convert the last letter of part1 and part2 to uppercase and concatenate the strings


Expand All @@ -33,6 +47,8 @@ const part2 = "script";
Iteration 2.1 | Calculate Tip
*******************************************/
const billTotal = 84;
const tipAmount = billTotal * 0.15;
console.log(tipAmount);

// Calculate the tip (15% of the bill total)

Expand All @@ -51,6 +67,8 @@ const billTotal = 84;

// Print the generated random number

const randomNumber = Math.floor(Math.random() * 10 + 1);
console.log(randomNumber);


/*******************************************
Expand All @@ -73,4 +91,13 @@ const expression5 = !a || !b;

const expression6 = !(a || b);

const expression7 = a && a;
const expression7 = a && a;

console.log(expression1);
console.log(expression2);
console.log(expression3);
console.log(expression4);
console.log(expression5);
console.log(expression6);
console.log(expression7);