# Doodle: data model of my life
```javascript=
// story of a regular day, Yanjun gets up at 9am.
let me = {
name: "Yanjun";
isHungry: true,
energy: 70,
stress: 10
};
//Usually, Yanjun doesn’t wake up energetically.
//Yanjun prepares and eats his breakfast.
let breakfast = [ [ "drink", 1], ["food", 1], ["snack", 1]];
var drinkQuantity = breakfast[0][1];
var foodQuantity = breakfast[1][1];
var snackQuantity = breakfast[2][1];
function eatBreakfast(){
me.isHungry = false;
me.energy = me.energy + 10;
drinkQuantity = drinkQuantity - 1;
foodQuantity = foodQuantity - 1;
snackQuantity = snackQuantity – 1;
};
// I use var instead of let or const here because I don't want the value to be block scoped.
//After Yanjun finishes his breakfast, he checks his emails.
let newEmail = true;
function respondEmail() {
if (newEmail === true) {
newEmail = false;
me.energy = me.energy - 20;
me.stress = me.stress + 20
} else {
show a picture of a smiley face
}
};
// no more Emails to respond, no change to the stress and energy level
//Another big part of Yanjun’s routine is working out in the Gym.
let gymChoice = [ [ "cardio", 1], ["freeweight", 2]];
//someone may be using the cardio machine when Yanjun walks into the Gym.
while (gymChoice[0][1] < 1) {
//Yanjun waits because he prefers to use cardio exercise as a warm-up
gymChoice[0][1]++;
}
while (gymChoice[0][1] = 1) {
//that person leaves
funtion PracticeCardio() {
me.stress -= 5;
me.energy -= 10
}
};
//what a bad day, two people are using the free-weight equipment now.
do {
//once again, Yanjun has to wait, he decidess to play with his cellphone.
Function waiting() {
gymChoice[1][1] += 1
me.stress -= 5;
me.energy -= 5
gymChoice[1][1]++
}
};
while (gymChoice[1][1] < 1);
//the equipment becomes available
while (gymChoice[1][1] > 0) {
funtion PracticeCardio() {
me.stress -= 5;
me.energy -= 10
};
};
//Yanjun eats food, checks his emails, and works out; let's call it a day
function sleep(){
let me.isHungry = true;
let me.energy = 70;
let me.stress = 10;
};
// no matter how much stress he gains during that day, he is ready to start the new day
```