diff --git a/pset1.js b/pset1.js index da1c583..33c9458 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 myHeightInches = 62; // ------------------------------------------- /* @@ -23,6 +25,7 @@ that stores your year of birth */ +const myBirthYear = 1991; // ------------------------------------------- /* @@ -31,6 +34,7 @@ that stores current year */ +let currentYear = 2018; // ------------------------------------------- /* @@ -40,6 +44,7 @@ from `myBirthYear` and `curentYear` */ +const myAge = currentYear - myBirthYear; // ------------------------------------------- /* @@ -53,7 +58,8 @@ */ - +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..a9d3a2f 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 - - +const myFirstName = "Osita"; +console.log(myFirstName); // 2. create another string - it should be your last name - - +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] - +let myName = myFirstName + " " + myLastName; +console.log(myName); // 4. create a string - it should be your middle name - - +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] +myName = myFirstName + " " + myMiddleName + " " + myLastName; +console.log(myName);