Skip to content
Open
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: 11 additions & 11 deletions scope.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
var isCookieJarOpen = null;

function closeLid() {
/* answer here */
isCookieJarOpen = false;
}

function openLid() {
/* answer here */
isCookieJarOpen = true;
}


Expand All @@ -17,7 +17,7 @@ function outerFunction() {

function innerFunction() {
var world = 'World';
return /* answer here */;
return hello + " " + world ;
}
return innerFunction();
}
Expand All @@ -31,8 +31,8 @@ function addMatrixElements(matrix) {

for(var i = 0; i < matrix.length; i++) {
/* fix counter variables in the second loop */
for(var i = 0; i < matrix[i].length; i++) {
result = result + matrix[i][i];
for(var n = 0; n < matrix[i].length; n++) {
result += matrix[i][n];
}
}
return result;
Expand All @@ -45,8 +45,8 @@ function sendDataToClient() {

var userObject = {
handle: 'neo',
authenticated: false
}
authenticated: true
};

function authenticateUser(obj, username) {
var userObject = {
Expand All @@ -56,11 +56,11 @@ function sendDataToClient() {

if (userObject.handle === username) {
userObject.authenticated = true;
return userObject
return userObject;
} else {
return userObject
return userObject;
}
}
authenticateUser(userObject, 'neo')
return userObject
authenticateUser(userObject, 'neo');
return userObject;
}