The os.EOL constant is an inbuilt application programming interface of the os module which is used to get end-of-line character or marker as specified by the operating system.
Return Value: It returns the EOL (end-of-line marker) as specified by the operating system on which it is running.
Below examples illustrate the use of os.EOL constant in Node.js:
Paragraphs always contains EOL EOL stands for end of line EOL varies from os to os For windows it is \r\n For POSIX it is \n
Note: The above program will compile and run by using the
node index.js command.
- Nodejs | Automatic restart NodeJs server with nodemon
- Nodejs | DNS
- Nodejs | DNS | setServers()
- Nodejs | Jimp
- Web-Socket in NodeJS
- Nodejs | GM charcoal() Function
- Nodejs | GM sharpen() Function
- Nodejs | GM blur() Function
- Difference between NodeJS and AngularJS
- Dockerizing a simple Nodejs app
- Nodejs | Web Crawling using Cheerio
- Encrypting Data in NodeJS
- Cowsay in Nodejs using Requests library
- Signup Form Using Nodejs and MongoDB
- NodeJs - Handling invalid routes
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.