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
22 changes: 12 additions & 10 deletions pset1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,24 @@
P1:
Create a variable called `myFullName`
that stores your full name as a variable

*/

const myFullName = 'Pamela Abreu';

// -------------------------------------------
/*
P2:
Create a variable called `myHeight`
that represents your height in inches

that represents your height in inches
*/
const myHeight = "5'2";

// -------------------------------------------
/*
P3:
Create a variable called `myBirthYear`
that stores your year of birth

*/
const myBirthYear = '1996';

// -------------------------------------------
/*
Expand All @@ -31,16 +30,18 @@
that stores current year

*/

const currentYear = '2018';
// -------------------------------------------
/*
P5:
Create a variable called `myAge`
that computes your current age
from `myBirthYear` and `curentYear`
Solution:
const myAge = 'Pamela Abreu';

*/

const myAge = (currentYear - myBirthYear)
// -------------------------------------------
/*
P6:
Expand All @@ -49,10 +50,11 @@
into a small string description about you

ie: Hello, my name is [fullName] and I am [myHeight]...
etc


etc
*/
let myDescription = 'Hello, my name is ' + myFullName + ' I am ' + myHeight + ' I am ' + myAge + '.';

console.log(myDescription);

// -------------------------------------------

Expand Down
14 changes: 12 additions & 2 deletions pset2.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,34 @@

// pleae create:
// a variable called `helloWrold`, you can set it equal to whatever you want
let helloWorld = 'Hello World';

// a variable called `this_is_snake_cased`, you can set it equal to whatever you want
let this_is_snake_cased = 'Snake cased variable';


// a variable called `thisVarHasNumbers111`, you can set it equal to whatever you want
let thisVarHasNumbers111 = 1111;


// 1. create a string - it should be your first name
let my_name = 'Pamela ';


// 2. create another string - it should be your last name

let my_last_name = 'Abreu ';

// 3. create a third string using the first two strings you've defined
let my_full_name = my_name + my_last_name;

// it should read [FIRST NAME][SPACE][LAST NAME]
console.log(my_full_name);

// 4. create a string - it should be your middle name

let middle_name = `I don't have a middle name b.`;

// 5. redefine the string in step 3. so that it now shows
// [FIRST NAME][SPACE][MIDDLE NAME][SPACE][LAST NAME]

console.log('My name is, ' + my_full_name + ",pero like, " + middle_name);