clear terminal node js

JavaScript
process.stdout.write('\x1Bc'); console.clear()console.log('\033[2J');
Source

Also in JavaScript: