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
33 changes: 25 additions & 8 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Create a variable that stores the name of your cafe.
Print out a greeting such as "Welcome to Technigo Cafe! What would you like to order today?"
Where echnigo Cafe is replaced by the name of your cafe that is stored in the variable.
*/
const cafeName = "Technigo Cafe";
const cafeName = "Technigogo Cafe";
console.log(`Welcome to ${cafeName}! What would you like to order today?`);

/*
Expand All @@ -14,14 +14,17 @@ 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 coffeePrice = 223;
const numberOfCoffees = 3;
console.log(`There you go, that'll be ${coffeePrice * numberOfCoffees} dollars`);
/*
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
*/

const isBest = true;
console.log(`You said this coffee is the best. That is actually ${isBest}!`);
/*
4)
Create a variable called cafeGuests, that shows us how many cafeGuests we have.
Expand All @@ -30,7 +33,10 @@ Print it out.
assign it a new value.
Print it out. => This should give you the new value.
*/

let cafeGuests = 22;
console.log(cafeGuests);
cafeGuests = 42;
console.log(cafeGuests);
/*
5)
Create a variable called maxGuests, that shows us how many guests are allowed in the cafe.
Expand All @@ -39,22 +45,33 @@ 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 = 40;
console.log(maxGuests);

console.log(`Below should be an error because of variable as const`);
// maxGuests = 41;
console.log(maxGuests);
/*
6)
Create a variable that stores a string.
Print out that string in only UPPERCASE letters.
*/

const artClubname = "Nouveau Art Club";
console.log(artClubname.toUpperCase());
/*
7)
Print out the same string in only lowercase letters.
*/

console.log(artClubname.toLowerCase());
/*
8) **BONUS**
Print out the string "Today we have a special summer deal!".
Then figure out a way to replace the word "summer" in the string with the word "winter"
*/
console.log(`Today we have a special summer deal!`);

/* Then figure out a way to replace the word "summer" in the string with the word "winter"
Should give you => "Today we have a special winter deal!"
(check for a specific string method...)
(check for a specific string method...)
*/
console.log("Today we have a special summer deal!".replace("summer", "winter"));