Question: JavaScript please You will be provided a file path for input I, a file path for output O, a string S, and a string T.
JavaScript please
You will be provided a file path for input I, a file path for output O, a string S, and a string T. Read the contents of I, replacing each occurrence of S with T and write the resulting information to file O. You should replace O if it already exists.
------
// Load the file system library
var fs = require('fs')
// Command line
var I= process.argv[2]
// input path
var O= process.argv[3]
// output path
var S= process.argv[4]
// String S
var T= process.argv[5]
// String T
// Your code goes here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
