It seems console.log()
is the equivalent of System.out.println()
How to print strings in the same line with multiple calls?
Like:
for (let i=0;i<2;i++){
console.log(i);
}
but print in the same line.
It seems console.log()
is the equivalent of System.out.println()
How to print strings in the same line with multiple calls?
Like:
for (let i=0;i<2;i++){
console.log(i);
}
but print in the same line.
console.log is not the equivalent, it does other things toolike formatting objects.
You're looking for process.stdout:
and