npm os clear screan code example Example 1: console.log clear screen console.clear() Example 2: clear the command prompt node console.log('\033[2J');