Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Done #102

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Done #102

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
6 changes: 4 additions & 2 deletions beyoncesAccountant.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
var beyoncesMoney = 500 + 750 + 3000 + 5100 + 12980 + 9087 + 50000;


console.log("Dear Beyonce,")
console.log("We have calculated your total earnings this year.")
console.log("You have earned " + beyoncesMoney)
Expand All @@ -9,5 +12,4 @@ console.log("Of" + 500 + 750 + 3000 + 5100 + 12980 + 9087 + 50000 + " some porti
// Now that we understand what a variable is
// rewrite the above lines of code using a variable to store the
// total sum, so that you don't have to add up all those numbers three times


totalSum = 500 + 750 + 3000 + 5100 + 12980 + 9087 + 50000;
11 changes: 7 additions & 4 deletions closure.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
function parent() {
var innerVariable = "Go to your room!";
console.log(inaccessible)
return function childe() {
return function child() {
var inaccessible = "**sneaks out the bedroom window**";
return innerVariable;
}
}

var outerScope = parent;
//var outerScope = parent;

var innerScope = outerScope();
//var innerScope = outerScope();

innerScope();
//innerScope();

var parentFunction = parent;
var childFuntion = parentFunction;

childFuntion();
10 changes: 4 additions & 6 deletions variables.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
name = "Beyonce";
var name = "Beyonce";
console.log(name);

var personality = "awesome"
console.log(personality)
var personality = "Motivated"
console.log(Motivated)
//

personality = "fabulous";
personality = "Individualistic";
console.log(personality);

// Your Turn!
// change the value of the `personality` variable to something that describes you
// and console.log the new value