title: How to update the expression printed with console.log?
body: <p>I just try to build a counter, which counts the seconds but it prints the second only once. Actually, the times function runs each second but it does not update the printed value before. Is there any way for it?</p>
  <pre><code>var times = () =&gt; {
    const d = new Date(); 
    return d.getSeconds();
   }
  console.log(setInterval(times, 1000)); // Write the console.log once and update the inner value each second
  </code></pre>