Javascript 如何让函数在ES6上协同工作?

Javascript 如何让函数在ES6上协同工作?,javascript,Javascript,到目前为止,我已经让我的所有函数都工作了,但是现在我无法让我的倒计时函数提醒某些东西,即使我确信我把它放在了正确的位置。此外,我还试图让我的pausePlay类在开始按钮消失后出现 const$startButton=document.getElementById(“开始”); //开始按钮 var startTimer=()=>{ $startButton.addEventListener('click',handleClickStartButton,true); }; //播放开始、暂停和

到目前为止,我已经让我的所有函数都工作了,但是现在我无法让我的
倒计时
函数提醒某些东西,即使我确信我把它放在了正确的位置。此外,我还试图让我的
pausePlay
类在开始按钮消失后出现

const$startButton=document.getElementById(“开始”);
//开始按钮
var startTimer=()=>{
$startButton.addEventListener('click',handleClickStartButton,true);
};
//播放开始、暂停和播放按钮的音频
var playAudio=()=>{
const$startSound=document.getElementById(“音频”);
const$pauseButton=document.getElementById(“暂停”);
const$playButton=document.getElementById(“play”);
$startSound.play();
$pauseButton.play();
$playButton.play();
};
//单击“开始”按钮后会发生什么
var handleClickStartButton=()=>{
$startButton.style.display=“无”;
const$pausePlay=document.getElementsByClassName(“pausePlay”);
const$pauseButton=document.getElementById(“暂停”);
const$playButton=document.getElementById('play');
对于(变量i=0;i

波莫多罗应用程序
应用程序
开始
5分钟休息
重新启动
结束会议

您在哪里调用
handleClickStartButton
?我只看到您在单击按钮时调用
playAudio
,甚至是“开始”按钮为什么您提到ES6并带有标签
ES6模块
?我看不出是什么使你的问题陈述具体到这两个方面。@trincot抱歉,我对这一切都不熟悉。我应该放置什么标签来指定我正在使用ES6?@slebetman my not calling在
startTimer
函数的开头?无需指定任何有关ES6版本的内容。即使您在支持ES7或更高版本时遇到问题,答案也不太可能需要使用某些特定语法,因为您的问题围绕计时器。问:为什么包括jQuery而不使用它?您在哪里调用
handleClickStartButton
?我只看到您在单击按钮时调用
playAudio
,甚至是“开始”按钮为什么您提到ES6并带有标签
ES6模块
?我看不出是什么使你的问题陈述具体到这两个方面。@trincot抱歉,我对这一切都不熟悉。我应该放置什么标签来指定我正在使用ES6?@slebetman my not calling在
startTimer
函数的开头?无需指定任何有关ES6版本的内容。即使您在支持ES7或更高版本时遇到问题,答案也不太可能需要使用某些特定语法,因为您的问题围绕计时器。问:为什么包括jQuery而不使用它?