Created
December 5, 2015 19:40
-
-
Save tanyagupta/d5f80b316102ffdc3251 to your computer and use it in GitHub Desktop.
MY FIRST ASYNC I/O! (Exercise 4 of 13)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var content = fs.readFile(process.argv[2],function(err,data){ | |
if(err){ | |
console.log('error'); | |
} | |
var lines=data.toString().split('\n'); | |
console.log(lines.length-1); | |
}); |
palaklive
commented
Mar 18, 2021
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment