若上述範例改用setInterval 執行,則每隔200 毫秒,監控台就會印出hello。 var clock = setInterval(printword , 200); function printword(){ console.log("hello"); }.
確定! 回上一頁