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
20 changes: 10 additions & 10 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 j = 0; j < matrix[i].length; j++) {
result = result + matrix[i][j];
}
}
return result;
Expand All @@ -54,13 +54,13 @@ function sendDataToClient() {
authenticated: false
};

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