How to search ?
I want to know how to search i need to search in a file pls any one help me
tussiez
Do you wish to search for text in a text file?
Then
//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)
RYANTADIPARTHI
Solution
use readdir
for searching file in node.js. HEre's a link that teaches you how to do it.
https://nodejs.org/en/knowledge/file-system/how-to-search-files-and-directories-in-nodejs/
IT should work
19wintersp
Ctrl+F (Cmd+F on a Mac) will let you search in the IDE.
Wdym?
@JBYT27 iam trying to get help from people
@JBYT27 help me
Ik, but what kind of helps? @Arrows12
@Arrows12 Do you want to find text in the script file?
Use
Ctrl
orCommand(Mac)
+F
.