In the Node js Documentation, I have seen something like this,
fs.readFile(path[, options], callback)
What do those square brackets mean? I'm sorry if this is duplicate, but I wasn't able to find an answer.
In the Node js Documentation, I have seen something like this,
fs.readFile(path[, options], callback)
What do those square brackets mean? I'm sorry if this is duplicate, but I wasn't able to find an answer.
It means that the parameter is optional. Call like
fs.readFile('some/path', options, callback)
or
fs.readFile('some/path', callback)