conditionals
This commit is contained in:
parent
bd86d3a373
commit
fc7f07ef47
13 changed files with 516 additions and 2 deletions
15
eloquentjavascript/04_data/index.html
Normal file
15
eloquentjavascript/04_data/index.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<script src="code/journal.js"></script>
|
||||
<script src="code/chapter/04_data.js"></script>
|
||||
|
||||
<body><script>
|
||||
for (let event of journalEvents(JOURNAL)) {
|
||||
let correlation = phi(tableFor(event, JOURNAL));
|
||||
if (correlation > 0.1 || correlation < -0.1) {
|
||||
console.log(event + ":", correlation);
|
||||
}
|
||||
}
|
||||
// → brushed teeth: -0.3805211953
|
||||
// → work: -0.1371988681
|
||||
// → reading: 0.1106828054
|
||||
</script></body>
|
Loading…
Add table
Add a link
Reference in a new issue