Skip to content
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jspm_packages
.node_repl_history

.DS_Store
.vscode*
40 changes: 27 additions & 13 deletions code/thursday.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var day = 'Thursday',
thursday = 'thursday';
var day = 'Thursday';
var thursday = 'thursday';

// How many equals signs does it take to muck up your code?
if (day = 'thursday') {
console.log('Test 1: Well lookee there, it\'s ' + day);
//if (day = 'thursday') {
// console.log('Test 1: Well lookee there, it\'s ' + day);
}

// The case of the failing "if" statement
Expand Down Expand Up @@ -46,17 +46,31 @@ if (day === 'Thursday') {

var days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];

// console.log('index 0: ' + days[0]);
// console.log('index 1: ' + days[1]);
// console.log('index 2: ' + days[2]);
// console.log('index 6: ' + days[6]);
// console.log('index 7: ' + days[7]);
// console.log('index 20: ' + days[20]);
console.log('index 0: ' + days[0]);
console.log('index 1: ' + days[1]);
console.log('index 2: ' + days[2]);
console.log('index 3: ' + days[3]);
console.log('index 4: ' + days[4]);
console.log('index 5: ' + days[5]);
console.log('index 6: ' + days[6]);

console.log('index 7: ' + days[7]);
console.log('index 20: ' + days[20]);


// TODO: DRY it up!
// for (var i = 0; i < 7; i++) {
// console.log('index ' + i + ': ' + days[i]);
// }
for (var i = 0; i < 7; i++) {
console.log('index ' + i + ': ' + days[i]);
}
// the variable i = 0 tells us where to start; the middle expression, i < 7
// runs the rest of the loop and tells us where to stop;
// the last expression, i++, tells us to increase by increments of 1.


// 0. Write tests. How does it need to work?
// 1. Make it run .
// 2. Make it right.
// 3. Make it fast/pretty/etc...


// TODO: Replace the "7" in "i < 7" with the length of the array
Expand Down
19 changes: 14 additions & 5 deletions notes/monday.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
Make a change
thursday
These are my Monday class notes
All about how to use Git
Worlds are unfolding
=======
Making my first change AQH


Make another change
Do something else

master
tra la la

here's another change
Thank you to the awesome instructors

See Notes in Mac for JavaScript notes CodeAcademy course.

more notes for a monday night!!!!
monday night
Now I am adding a note so I can check this in the terminal.
1 change: 1 addition & 0 deletions notes/thursday-lizp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hi there. This is my change.
8 changes: 8 additions & 0 deletions notes/tuesday.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
thursday
# Tuesday notes
* how to use vi
liz's page


read git book and notes for today


master
35 changes: 35 additions & 0 deletions notes/wednesday.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
thursday
function sayMyName () {
consolelog('Hi, Beth');
}

sayMyName ();

//This calls the function, but does not execute the function.

var sayMyClass = function() {
console.log('Code 102');
};
sayMyClass();

//That expression calls the function.

sayMyClass

//Calls the function


Functions are things like strings, numbers, arrays, etc. They are things the computer knows about and does something with.


myRandomFunction = sayMyClass;

//This puts the function itself into a named variable.

myRandomFunction()
//returns: Code102

//Calls the function

change change change
master
24 changes: 24 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
var addNumbers = function(a, b){
return a + b;
};

addNumbers(2, 5);
//return 7

addNumbers(50, 20);
//return 70

addNumbers = function(a, b){
return a * b;
}

function () {
return a + b;
}
//this is an anonymous function, but how do we invoke this?

function () {
return a + b;
}();

//Adding the parens invokes the function. This is an IIFE.