Javascript – Print an output in one line using console.log()


Is it possible to print the output in the same line by using console.log() in JavaScript? I know console.log() always returns a new line. For example, have the output of multiple consecutive console.log() calls be:


Best Answer

In Node.js there is a way: process.stdout

So, this may work:


where index is a current data and , is a delimiter.

Also you can check same topic here.