Skip to content

Instantly share code, notes, and snippets.

View victuk's full-sized avatar
😁
Full stack developer.

Victor Peter Ukok victuk

😁
Full stack developer.
View GitHub Profile
@victuk
victuk / solution.js
Created October 29, 2021 16:35 — forked from gitfaf/solution.js
Solves lycanthrope's log problem from eloquent javascript.
/* Data from http://eloquentjavascript.net/code/#4 */
/* phi logic from http://www.pmean.com/definitions/phi.htm */
var JOURNAL = [
{"events":["carrot","exercise","weekend"],"squirrel":false},
{"events":["bread","pudding","brushed teeth","weekend","touched tree"],"squirrel":false},
{"events":["carrot","nachos","brushed teeth","cycling","weekend"],"squirrel":false},
{"events":["brussel sprouts","ice cream","brushed teeth","computer","weekend"],"squirrel":false},
{"events":["potatoes","candy","brushed teeth","exercise","weekend","dentist"],"squirrel":false},
{"events":["brussel sprouts","pudding","brushed teeth","running","weekend"],"squirrel":false},