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
21 changes: 21 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ Create a variable that stores how many coffees the customer wants.
Print out the total price such as "There you go, that'll be 10 euros"
Where 10 is replaced by the calculation of the total price.
*/
const priceCoffee = 3;
let coffees = 2;
let total = priceCoffee*coffees;
console.log(`Here you go, that'll be ${total} Euro`)

/*
3)
Create a variable that stores a boolean.
Print out "You said this coffee is the best, that was actually true"
Where true is replaced by your varible
*/
let best = true;
console.log(`You said ths coffee was the best I can drink. I think this is acually ${best}`);

/*
4)
Expand All @@ -30,6 +36,10 @@ Print it out.
Assign it a new value.
Print it out. => This should give you the new value.
*/
let cafeGuests = 15;
console.log(cafeGuests);
cafeGuests =21;
console.log(cafeGuests);

/*
5)
Expand All @@ -39,17 +49,24 @@ Print it out.
assign it a new value.
Print it out. => This should give you an error because it shouldn't be able to be changed.
*/
const maxGuests= 105;
console.log(maxGuests);
maxGuests = 120;

/*
6)
Create a variable that stores a string.
Print out that string in only UPPERCASE letters.
*/

let greeting = "Hello";
console.log(greeting.toUpperCase());

/*
7)
Print out the same string in only lowercase letters.
*/
console.log(greeting.toLowerCase());

/*
8) **BONUS**
Expand All @@ -58,3 +75,7 @@ Then figure out a way to replace the word "summer" in the string with the word "
Should give you => "Today we have a special winter deal!"
(check for a specific string method...)
*/
let deal = "Today we have a special summer deal!";
console.log(deal);
let winter = Text.replace("summer","winter");
console.log(winter);