From cd63bfd46473c654023230592434064794786228 Mon Sep 17 00:00:00 2001 From: "Mr. Metelus" Date: Thu, 4 Oct 2018 13:19:26 -0400 Subject: [PATCH 1/4] New file for me to add --- mMetelus.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 mMetelus.txt diff --git a/mMetelus.txt b/mMetelus.txt new file mode 100644 index 0000000..4cebde6 --- /dev/null +++ b/mMetelus.txt @@ -0,0 +1 @@ +New file for the demo \ No newline at end of file From b4f4f7a011495088cc1ea4f7fc08c13fac894178 Mon Sep 17 00:00:00 2001 From: "Mr. Metelus" Date: Thu, 4 Oct 2018 16:45:17 -0400 Subject: [PATCH 2/4] This is the demo of both lambda work and todays challenge question all done in the CLI for text and code.This is a commit amend. --- MaxM.js | 11 +++++++++++ MaxM.txt | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 MaxM.js create mode 100644 MaxM.txt diff --git a/MaxM.js b/MaxM.js new file mode 100644 index 0000000..e53fb72 --- /dev/null +++ b/MaxM.js @@ -0,0 +1,11 @@ +// morning coding chalenge +// this is also my first attempt at coe in Js in the command line editer. if only vi had spell check.lol + + +function reverseNumber(num) { + let result = num.toString(); + let result1 = result.split("").reverse().join(""); + let result2 = Number(result1) + return result2; +} + console.log(reverseNumber(12345)); diff --git a/MaxM.txt b/MaxM.txt new file mode 100644 index 0000000..03ebd5d --- /dev/null +++ b/MaxM.txt @@ -0,0 +1,3 @@ + +New file +no info of importance. From f47d207f40d7301be73a4c26bbb737b1e497fe85 Mon Sep 17 00:00:00 2001 From: "Mr. Metelus" Date: Sun, 14 Oct 2018 13:41:24 -0400 Subject: [PATCH 3/4] A simple function implementation in an html form --- testOut/index.html | 94 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 testOut/index.html diff --git a/testOut/index.html b/testOut/index.html new file mode 100644 index 0000000..0518f47 --- /dev/null +++ b/testOut/index.html @@ -0,0 +1,94 @@ + + + + + + + + Document + + + + + + + +
+

+

+ +

+

+ +

+
+ +
+

+

+

+

+

+
+
+

+ + + +

+ + + + + + \ No newline at end of file From 90199f48ae2c7d977fedeb4a3f7eae16c440626d Mon Sep 17 00:00:00 2001 From: "Mr. Metelus" Date: Sun, 14 Oct 2018 17:03:02 -0400 Subject: [PATCH 4/4] stuff --- VariablesChalenge.js | 65 ++++++++++++++++++++++++++++++++++++++++ jsBinObjectsExersize.js | 45 ++++++++++++++++++++++++++++ jsBinObjectsExersizeA.js | 45 ++++++++++++++++++++++++++++ testOut/index.html | 27 +++-------------- 4 files changed, 159 insertions(+), 23 deletions(-) create mode 100644 VariablesChalenge.js create mode 100644 jsBinObjectsExersize.js create mode 100644 jsBinObjectsExersizeA.js diff --git a/VariablesChalenge.js b/VariablesChalenge.js new file mode 100644 index 0000000..b83bad5 --- /dev/null +++ b/VariablesChalenge.js @@ -0,0 +1,65 @@ + +[200~/* ==== Challenge 1: ==== + - Create a variable named `name` + - Assign it's value to your first and last name + - Does this variable need to be a constant? It depends completely on you! It should be a const variable IF you intend to never change your name. + */ + + code for `name` goes here + const name = 'Max David Metelus'; + + /* ==== Challenge 2: ==== + - Create a variable called `age` + - UNLESS you've descovered a very important secret in life, you should probably allow for `mutability` here. + */ + + // code for `age` goes here + let age = '34'; + + /* ==== Challenge 3: ==== + - Create a variable called `myLocation` + - Base the value on where you're currently sitting. Consider if this is something that could change eventually. + */ + + // code for `myLocation` goes here + let myLocation = 'in a chair'; + + /* ==== Challenge 4: ==== + - Create a variable called `faveBook` + - Consider if this is some data about yourself that could change. + */ + + // code for `faveBook` goes here + const faveBook = 'The Bible'; + + /* ==== Challenge 5: ==== + - Create a variable called `faveBand` + - Consider if this is some data about yourself that could change. + */ + + // code for `faveBand` goes here + let faveBand = null; + + /* ==== Challenge 6: ==== + - Problem create a variable called `faveFood` + - Consider if this is some data about yourself that could change. + */ + + // code for `faveFood` goes here + const faveFood = 'My Cooking'; + + /* ==== Challenge 7: ==== + - Look at the function declaration named `example` below + - Comment `block scope` where you see block scope + - Comment `function scope` where you see function scope + */ + + function example() { + //function scope( block scope too!) + if(true){ + //block scope + } + } + + + // Check your work against some potential solutions when you're finished: https://codepen.io/lambdaschool/pen/ejbEGN?editors=0012 diff --git a/jsBinObjectsExersize.js b/jsBinObjectsExersize.js new file mode 100644 index 0000000..b7f56a6 --- /dev/null +++ b/jsBinObjectsExersize.js @@ -0,0 +1,45 @@ +/* + Objects are used all over in JavaScript. + These following problems will help you get a better feel for object literals + We want you familiar with the following Object methods: + .keys(), .values(), .entries(), . + https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype +*/ + +/* + Problem 1: Giver Info + return an array of an Objects properties/keys +*/ + +const student = { name: 'Jonas', age: '12', gender: 'M', role: 'Receiver' }; +const studentKeys = Object.keys(student);// finish this. + +/* + Problem 2: Giver Info + using the same object as above. + return an array of an Objects values +*/ + +const studentValues = Object.values(student); // finish this. + +/* + Problem 3: Giver Info + Add a list of charecters to Jonas' object + The list should be called 'characters' and it should be an array. + example: + { name: 'Jonas', age: '12', gender: 'M', role: 'Receiver', characters: ['Lily', 'Mother', 'Father', 'Caleb', 'Asher']} + next: select that list and iterate over it using `.forEach` simply log the name of each char in the list; +*/ + +//const listOfChars = student.characters; // finish this. + +student.characters = []; +student.characters.push['Lily']; +student.characters.push['Mother']; +student.characters.push['Father']; +student.characters.push['Caleb']; +student.characters.push['Asher']; + +character.forEach(list(){ + console.log(list) + }) diff --git a/jsBinObjectsExersizeA.js b/jsBinObjectsExersizeA.js new file mode 100644 index 0000000..19b5921 --- /dev/null +++ b/jsBinObjectsExersizeA.js @@ -0,0 +1,45 @@ +/* + Objects are used all over in JavaScript. + These following problems will help you get a better feel for object literals + We want you familiar with the following Object methods: + .keys(), .values(), .entries(), . + https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype +*/ + +/* + Problem 1: Giver Info + return an array of an Objects properties/keys +*/ + +const student = { name: 'Jonas', age: '12', gender: 'M', role: 'Receiver' }; +const studentKeys = Object.keys(student);// finish this. + +/* + Problem 2: Giver Info + using the same object as above. + return an array of an Objects values +*/ + +const studentValues = Object.values(student); // finish this. + +/* + Problem 3: Giver Info + Add a list of charecters to Jonas' object + The list should be called 'characters' and it should be an array. + example: + { name: 'Jonas', age: '12', gender: 'M', role: 'Receiver', characters: ['Lily', 'Mother', 'Father', 'Caleb', 'Asher']} + next: select that list and iterate over it using `.forEach` simply log the name of each char in the list; +*/ + +//const listOfChars = student.characters; // finish this. + +student.characters = []; +student.characters.push['Lily']; +student.characters.push['Mother']; +student.characters.push['Father']; +student.characters.push['Caleb']; +student.characters.push['Asher']; + +character.forEach(list(){ + console.log(list); +}); diff --git a/testOut/index.html b/testOut/index.html index 0518f47..0f2924a 100644 --- a/testOut/index.html +++ b/testOut/index.html @@ -5,40 +5,21 @@ - Document + Learnnig Javascript - +

- +