1 console.clear()
1 <!DOCTYPE html>
2 <html>
3 <body>
4
5 <h1>The Console Object</h1>
6 <h2>The assert() Method</h2>
7 <p>The console clear after 1 second</p>
8
9 <script>
10 console.log("The console clear after 1 second");
11 setTimeout(()=> {
12 console.clear();
13 }, 1000);
14 </script>
15 </body>
16 </html>