Skip to content

Instantly share code, notes, and snippets.

View kidCaulfield's full-sized avatar
🐒
coding

Wes Coderre kidCaulfield

🐒
coding
View GitHub Profile
// calcuale the greatest profit
function evaluate() {
// store greatest profit
let evaluation = -1;
// calculate position
return function (min, max) {
const profit = max - min;
evaluation = evaluation < profit ? profit : evaluation;