<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title> Tamagotchi </title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <h3 class="title" style="color: purple"> Tamagotchi </h3> <script src="main.js" async defer></script> <img id="tam" src="images/chame.png" alt="tama" width="300" height="300"> <img id="love" src="images/sleepy.jpeg" alt="tame" width="300" height="300"> <img id="love" src="images/chamametchi.jpeg" alt="tame" width="300" height="300"> <img id="love" src="images/cry.jpeg" alt="tame" width="300" height="300"> <p id="count">Hunger: 2 </p> <p id="age">Age: 3 </p> <p id="boredom"> Boredom: 7</p> <p id="sleepiness"> Sleepiness: 1 </p> <button id="btn-start">Feed</button> <button id="btn-pause">Play</button> <button id="btn-stop">Stop</button> <!-- <p> <div id="my-hunger"> Hunger: 0 </div> </p> <p> <div id="my-sleepiness"> Sleepiness: 3</div></p> <p> <div id="my-boredom"> Boredom: 5 </div></p> <p> <div id="my-age"> Age: 8 </div></p> <button id="my-hungry">Feed</button> <button id="my-feed">Age</button> <button id="my-play">Boredom</button> --> <p> Contact: <a href="https://www.linkedin.com/in/marisha-glasgow-1552b883/" target="_blank" href="">Linkedin</a> <a href="https://github.com/Marisha96/Tamagotchi-/commits/main" target="_blank" href="">Github </a> </p> </body> </html>
// let myName = window.prompt("enter name please?"); // console.log("Hello", myName ); // document.getElementById("myButton").onclick = function () => // { // let myName = document.getElementById("myText").value; // console.log("Hello", myName); // } const feedEl = document.getElementById("btn-start"); const playEl = document.getElementById("btn-pause"); const stopEl = document.getElementById("btn-stop"); const hungerEl = document.getElementById("count"); const ageEl = document.getElementById("age"); let count = 6; let myCounter = null; // console.log(typeof(myCounter)); function handlefeedClick() { // console.log("start button clicked!"); myCounter = setInterval(function(){
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)