Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get a particular line from a file in nodejs

lineReader.open('/path/to/file', function(reader) {
    if (reader.hasNextLine()) {
        reader.nextLine(function(line) {
            console.log(line);
        });
    }
});
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #line #file #nodejs
ADD COMMENT
Topic
Name
7+4 =