From e6c5360975cec737a7f2173137ebb396749b4e80 Mon Sep 17 00:00:00 2001 From: "ositaigwe@pursuit.org" Date: Sat, 6 Oct 2018 15:44:52 -0400 Subject: [PATCH 1/6] adds variables to pset1.js --- pset1.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pset1.js b/pset1.js index da1c583..bd4c133 100644 --- a/pset1.js +++ b/pset1.js @@ -7,6 +7,7 @@ */ +const myFullName = "Osita Igwe"; // ------------------------------------------- /* @@ -15,6 +16,7 @@ that represents your height in inches */ +const myHeight = 62; // ------------------------------------------- /* @@ -23,6 +25,7 @@ that stores your year of birth */ +const myBrithYear = 1991; // ------------------------------------------- /* @@ -31,6 +34,7 @@ that stores current year */ +let currentYear = 2018; // ------------------------------------------- /* @@ -40,6 +44,7 @@ from `myBirthYear` and `curentYear` */ +let myAge = currentYear - myBrithYear; // ------------------------------------------- /* @@ -53,7 +58,8 @@ */ - +let myDescription = "Hello, my name is " + myFullName + " ,and I am " + myAge + ". I am short, with a height of " + myHeight + " inches." +console.log (myDescription); // ------------------------------------------- From c4a88b572673de53250a012aa445cbbf8eca51b0 Mon Sep 17 00:00:00 2001 From: "ositaigwe@pursuit.org" Date: Sat, 6 Oct 2018 15:47:08 -0400 Subject: [PATCH 2/6] changes variable --- pset1.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pset1.js b/pset1.js index bd4c133..196c3f9 100644 --- a/pset1.js +++ b/pset1.js @@ -44,7 +44,7 @@ let currentYear = 2018; from `myBirthYear` and `curentYear` */ -let myAge = currentYear - myBrithYear; +const myAge = currentYear - myBrithYear; // ------------------------------------------- /* From db87b6f50be6b27a1445e8ffb7afe0821cab0a6d Mon Sep 17 00:00:00 2001 From: "ositaigwe@pursuit.org" Date: Sat, 6 Oct 2018 15:48:48 -0400 Subject: [PATCH 3/6] corrects spelling --- pset1.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pset1.js b/pset1.js index 196c3f9..c0c85c3 100644 --- a/pset1.js +++ b/pset1.js @@ -25,7 +25,7 @@ const myHeight = 62; that stores your year of birth */ -const myBrithYear = 1991; +const myBirthYear = 1991; // ------------------------------------------- /* @@ -44,7 +44,7 @@ let currentYear = 2018; from `myBirthYear` and `curentYear` */ -const myAge = currentYear - myBrithYear; +const myAge = currentYear - myBirthYear; // ------------------------------------------- /* From a0b1c7b5791bbc2f4f5fb0f36d8ff15de6a57221 Mon Sep 17 00:00:00 2001 From: "ositaigwe@pursuit.org" Date: Sat, 6 Oct 2018 16:45:30 -0400 Subject: [PATCH 4/6] adds pset2 --- pset1.js | 4 ++-- pset2.js | 28 ++++++++++++++++------------ 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/pset1.js b/pset1.js index c0c85c3..33c9458 100644 --- a/pset1.js +++ b/pset1.js @@ -16,7 +16,7 @@ const myFullName = "Osita Igwe"; that represents your height in inches */ -const myHeight = 62; +const myHeightInches = 62; // ------------------------------------------- /* @@ -58,7 +58,7 @@ const myAge = currentYear - myBirthYear; */ -let myDescription = "Hello, my name is " + myFullName + " ,and I am " + myAge + ". I am short, with a height of " + myHeight + " inches." +let myDescription = `Hello, my name is ${myFullName}, and I am ${myAge}. I am short - with a height of ${myHeightInches} inches.` console.log (myDescription); // ------------------------------------------- diff --git a/pset2.js b/pset2.js index 98d7b32..b4a13c5 100644 --- a/pset2.js +++ b/pset2.js @@ -3,24 +3,28 @@ // pleae create: // a variable called `helloWrold`, you can set it equal to whatever you want - +let helloWrold = "bad spelling"; +console.log(helloWrold); // a variable called `this_is_snake_cased`, you can set it equal to whatever you want - - +let this_is_snake_cased = "snakes are slithery"; +console.log(this_is_snake_cased); // a variable called `thisVarHasNumbers111`, you can set it equal to whatever you want - - +let thisVarHasNumbers111 = 111; +console.log(thisVarHasNumbers111) // 1. create a string - it should be your first name - - +let myFirstName = "Osita "; +console.log(myFirstName); // 2. create another string - it should be your last name - - +let myLastName = "Igwe"; +console.log(myLastName); // 3. create a third string using the first two strings you've defined // it should read [FIRST NAME][SPACE][LAST NAME] - +myName = myFirstName + myLastName; +console.log(myName); // 4. create a string - it should be your middle name - - +myMiddleName = "Chidinma "; +console.log(myMiddleName); // 5. redefine the string in step 3. so that it now shows // [FIRST NAME][SPACE][MIDDLE NAME][SPACE][LAST NAME] +myFirstName += myMiddleName += myLastName; +console.log(myFirstName); \ No newline at end of file From 48e4399aee7f3157b5937b96b1d9324409d67a83 Mon Sep 17 00:00:00 2001 From: oigwe <43799140+oigwe@users.noreply.github.com> Date: Sat, 6 Oct 2018 18:38:28 -0400 Subject: [PATCH 5/6] adds additional answer --- pset2.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pset2.js b/pset2.js index b4a13c5..7a76e5c 100644 --- a/pset2.js +++ b/pset2.js @@ -26,5 +26,6 @@ myMiddleName = "Chidinma "; console.log(myMiddleName); // 5. redefine the string in step 3. so that it now shows // [FIRST NAME][SPACE][MIDDLE NAME][SPACE][LAST NAME] -myFirstName += myMiddleName += myLastName; -console.log(myFirstName); \ No newline at end of file +myFirstName += myMiddleName += myLastName; +//or myFullName = myFirstName + " " + myMiddleName + " " + myLastName; +console.log(myFirstName); From c96206c4269d6db34fd6be91fafcaf5c783d93b9 Mon Sep 17 00:00:00 2001 From: oigwe <43799140+oigwe@users.noreply.github.com> Date: Sat, 6 Oct 2018 18:55:36 -0400 Subject: [PATCH 6/6] corrections --- pset2.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/pset2.js b/pset2.js index 7a76e5c..a9d3a2f 100644 --- a/pset2.js +++ b/pset2.js @@ -12,20 +12,19 @@ console.log(this_is_snake_cased); let thisVarHasNumbers111 = 111; console.log(thisVarHasNumbers111) // 1. create a string - it should be your first name -let myFirstName = "Osita "; +const myFirstName = "Osita"; console.log(myFirstName); // 2. create another string - it should be your last name -let myLastName = "Igwe"; +const myLastName = "Igwe"; console.log(myLastName); // 3. create a third string using the first two strings you've defined // it should read [FIRST NAME][SPACE][LAST NAME] -myName = myFirstName + myLastName; +let myName = myFirstName + " " + myLastName; console.log(myName); // 4. create a string - it should be your middle name -myMiddleName = "Chidinma "; +const myMiddleName = "Chidinma"; console.log(myMiddleName); // 5. redefine the string in step 3. so that it now shows // [FIRST NAME][SPACE][MIDDLE NAME][SPACE][LAST NAME] -myFirstName += myMiddleName += myLastName; -//or myFullName = myFirstName + " " + myMiddleName + " " + myLastName; -console.log(myFirstName); +myName = myFirstName + " " + myMiddleName + " " + myLastName; +console.log(myName);