Completed exercise 04
Probably should've commited steps...
This commit is contained in:
parent
6c3c3f2de6
commit
695f4b121f
|
@ -13,14 +13,14 @@
|
|||
*/
|
||||
|
||||
// code to be deleted
|
||||
const birthYear = 1948;
|
||||
const thisYear = 1965;
|
||||
const firstName = "Carlos";
|
||||
const lastName = "Stevenson";
|
||||
// const birthYear = 1948;
|
||||
// const thisYear = 1965;
|
||||
// const firstName = "Carlos";
|
||||
// const lastName = "Stevenson";
|
||||
|
||||
const greeting = "Hello! My name is " + firstName + " " + lastName + " and I am " + (thisYear - birthYear) + " years old.";
|
||||
// const greeting = "Hello! My name is " + firstName + " " + lastName + " and I am " + (thisYear - birthYear) + " years old.";
|
||||
|
||||
console.log(greeting);
|
||||
// console.log(greeting);
|
||||
|
||||
/*
|
||||
|
||||
|
@ -54,6 +54,17 @@ console.log(greeting);
|
|||
|
||||
//===== Your code goes here =================
|
||||
|
||||
const birthYear = 1948;
|
||||
const thisYear = 1965;
|
||||
const firstName = "Carlos";
|
||||
const lastName = "Stevenson";
|
||||
const fullName = `${firstName} ${lastName}`;
|
||||
const age = thisYear - birthYear;
|
||||
|
||||
let greeting = `Hello! My name is ${fullName} and I am ${age} years old.`;
|
||||
|
||||
console.log(greeting);
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
@ -87,25 +98,25 @@ console.log(greeting);
|
|||
|
||||
// Test Step 2:
|
||||
|
||||
module.exports = {
|
||||
testGroup: "a",
|
||||
greeting,
|
||||
birthYear,
|
||||
thisYear,
|
||||
firstName,
|
||||
lastName
|
||||
}
|
||||
// module.exports = {
|
||||
// testGroup: "a",
|
||||
// greeting,
|
||||
// birthYear,
|
||||
// thisYear,
|
||||
// firstName,
|
||||
// lastName
|
||||
// }
|
||||
|
||||
|
||||
// Test Step 3: (Don't forget to comment out lines under Test Step 2)
|
||||
|
||||
// module.exports = {
|
||||
// testGroup: "b",
|
||||
// greeting,
|
||||
// birthYear,
|
||||
// thisYear,
|
||||
// firstName,
|
||||
// lastName,
|
||||
// fullName,
|
||||
// age
|
||||
// }
|
||||
module.exports = {
|
||||
testGroup: "b",
|
||||
greeting,
|
||||
birthYear,
|
||||
thisYear,
|
||||
firstName,
|
||||
lastName,
|
||||
fullName,
|
||||
age
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue