How to search ?
I want to know how to search i need to search in a file pls any one help me
Do you wish to search for text in a text file?
//Why do I always use readFileSync? Idk lol const fs = require('fs'); //Get file let file = fs.readFileSync('things.txt','utf8'); //By line: file = file.split('\n'); let word = file[file.indexOf('something')]
If you want to search for text in Repl, use Ctrl/Command + F (Find)
readdir for searching file in node.js. HEre's a link that teaches you how to do it.
IT should work