<h1>D2 - Data of My Life</h1>
:::danger
prompt: https://docs.google.com/document/d/1N3cV5q4uR5ahurds6B1naXFaNwmBWsMpWNY67vndXOk/edit
:::
<h2>
A Weekday in Manhattan
</h2>
<text>
This doodle represents a weekday day of Estelle while she lives in Manhattan.
</text>
<h2>
Description
</h2>
<text>
<b>Main Character</b>: Estelle (shortened to "eee")
eee has two variables</b>: name, mood (Hungry, Motivated, Inspired, Sleepy, Bored)
<br><b>Location</b> : NYC ("nyc"), which has an array of destinations
<br><b>Day</b>: The Day ("day") includes the locations that "eee" has visited, based on the mood "eee" feels. (Although I am not quite sure if it is the accurate way to code it!)
eee has four variables: name, isHungry, isMotivated, isInspired, isSleepy
</text>
<h2>
Code
</h2>
```
let eee = {
name: "Estelle",
mood: hungry, energized, inspired, sleepy
}
let nyc = {
country: "USA",
locations: [
["home", sleepy],
["joes coffee", energized],
["magnolia bakery", hungry],
["bondi sushi", hungry],
["moma", inspired],
["new york pilates", sleepy]
["columbia university", inspired]]
}
let day = {
weekday: "Wednesday",
locationsVisited: []
checkMood();
}
function idealDayStart() {
let nameChecked = nameCheck(eee);
if (nameChecked == true) {
if (eee.isHungry) {
eatFood();
}
}
else {goWork()};
}
function idealDayWork() {
let nameChecked = nameCheck(eee);
if (nameChecked == true) {
if (eee.isEnergized) {
goWork();
}
}
else {goGetInspired()};
}
function idealDayPlay() {
let nameChecked = nameCheck(eee);
if (nameChecked == true) {
if (eee.isSleepy) {
location.();
}
}
else {goGetInspired()};
}
function visitLocation() {
let attr = nyc.locations.pop();
day.locationVisited.push(attr[0]);
checkHungry();
checkEnergized();
checkInspired();
checkSleepy();
journey.numOfLocationsVisited++;
}
function test() {
for (mood of day) {
if (day.mood.includes("hungry"))
console.log("hungry" + location.name);
}
}
test();
function test() {
for (mood of day) {
if (day.mood.includes("energized"))
console.log("hungry" + location.name);
}
}
test();
function test() {
for (mood of day) {
if (day.mood.includes("inspired"))
console.log("inspired" + location.name);
}
}
test();
function test() {
for (mood of day) {
if (day.mood.includes("sleepy"))
console.log("sleepy" + location.name);
}
}
test();
function nameCheck(mainCharacter){
return Boolean(mainCharacter.name == "Estelle");
}
day();
```