```javascript= let name = "Manya Qi"; let mood = 100; let hunger = 0 let hamburger = { name: "hamburger", delicious: "6" } let sandwich = { name: "sandwich", delicious: "7" } let pizza = { name: "pizza", delicious: "8" } let meals = [hamburger, sandwich, pizza] getTime(); // When the clock strikes 12 am, Manya becomes hungary and feel moody. mood = mood - 50; //50 hunger = hunger + 100; //100 function takeFood(food) { if food.delicious > 7 then hunger = hunger - 100; mood = mood + 100; else hunger = hunger -100; mood = mood + 50; } // get random food from meals as food takeFood(food); sleep(); ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up