This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
/** | |
* For a given student, determine whether or not they are passing | |
* @constructor | |
* @param {Object} student - The student that being evaluated. | |
*/ | |
var DetermineStudentPassingStatus = function(student) { | |
this.student = student; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Primitives | |
var foo = 2; | |
var bar = 2; | |
foo === bar; // => true | |
// Object identity | |
var foo = new Number(2); | |
var bar = new Number(2); | |
foo === bar; // => false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myGrade = new Grade(0.65); | |
alert('My Grade is ' + myGrade + '!'); // alerts, 'My Grade is 0.65!' | |
var myOtherGrade = new Grade(0.75); | |
myGrade < myOtherGrade; // true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var _ = require('underscore'); | |
var Grade = function(percentage) { | |
this.percentage = percentage; | |
this.grade = this.grade(percentage); | |
}; | |
Grade.prototype = _.extend(Grade.prototype, { | |
passingGradeLetters: function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Grade = require('./grade'); | |
var grade1; | |
var grade2; | |
describe('Grade', function() { | |
describe('#isPassing', function() { | |
it('returns true if grade is passing', function() { | |
grade1 = new Grade(0.8); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myGrade = new Grade(0.65); | |
var myOtherGrade = new Grade(0.65); | |
myGrade === myOtherGrade; // false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var firstStudent = {grade: new Grade(0.45)}; | |
var secondStudent = {grade: new Grade(0.70)}; | |
firstStudent.grade.isPassing() //=> false | |
firstStudent.grade.isBetterThan(secondStudent.grade); //=> false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scp [email protected]:/srv/bidkind/shared/log/* logs/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongodb://userMJzqT7:[email protected]:10243,candidate.12.mongolayer.com:10239/bidkind-staging-elastic |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var IssueGrades = function( gradedAssignments ) {} | |
IssueGrades.prototype = { | |
run: function() { | |
alert('issued!'); | |
return gradedAssignments; | |
} | |
} |