Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 7 additions & 1 deletion pset1.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

*/

const myFullName = "Osita Igwe";

// -------------------------------------------
/*
Expand All @@ -15,6 +16,7 @@
that represents your height in inches

*/
const myHeightInches = 62;

// -------------------------------------------
/*
Expand All @@ -23,6 +25,7 @@
that stores your year of birth

*/
const myBirthYear = 1991;

// -------------------------------------------
/*
Expand All @@ -31,6 +34,7 @@
that stores current year

*/
let currentYear = 2018;

// -------------------------------------------
/*
Expand All @@ -40,6 +44,7 @@
from `myBirthYear` and `curentYear`

*/
const myAge = currentYear - myBirthYear;

// -------------------------------------------
/*
Expand All @@ -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);
// -------------------------------------------


28 changes: 16 additions & 12 deletions pset2.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);