From 1e75be6b8b5ab678e73b1471a7e702e48eb267b8 Mon Sep 17 00:00:00 2001 From: Pamela Abreu Date: Sat, 6 Oct 2018 15:55:36 -0400 Subject: [PATCH 1/2] Changed descriptions about me --- pset1.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/pset1.js b/pset1.js index da1c583..ff59132 100644 --- a/pset1.js +++ b/pset1.js @@ -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'; // ------------------------------------------- /* @@ -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: @@ -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); // ------------------------------------------- From 890dfae2e6e97268b8c2a58594ab815e17e85b1d Mon Sep 17 00:00:00 2001 From: Pamela Abreu Date: Sat, 6 Oct 2018 16:34:57 -0400 Subject: [PATCH 2/2] Edited information from 1 to 5. --- pset2.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pset2.js b/pset2.js index 98d7b32..2137862 100644 --- a/pset2.js +++ b/pset2.js @@ -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); +