//new Audio('catmeow2.mp3').play();
let timer = true;
let crySound = new Audio('catmeow1.mp3');
setTimeout(function(){ cry(); }, 3000);
function cry(){
if(timer === true){
console.log(crySound.currentSrc);
console.log(crySound.readyState);
crySound.play();
setTimeout(function(){ cry(); }, 1000);
}
}
function feed() {
let elm = document.querySelector(".hungry");
let newone = elm.cloneNode(true);
crySound.pause();
crySound = new Audio('catmeow1.mp3')
elm.parentNode.replaceChild(newone, elm);
const chewSound = new Audio('Chew.mp3').play()
timer = false;
setTimeout(function(){ timer = true; cry(); }, 6000);
}