I'm learning nodejs(and I like it!). I tried to figure out how to have shorter alias for console.log
and I found out that I can use var cout=console.log
and use cout('[string]')
from then on. Then when I wanted to use process.stdout.write
and I tried to make a short alias for it too, using var out=process.stdout.write
. But when I use out('[string]')
, I get the error shown in the image below.
What is wrong here?
How can I correctly create a short alias for process.stdout.write
?
Thanks
massivefermion 3 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.