Here in this program "aqString" was not defined please check it again
let inputString = '';
let currentLine = 0;
process.stdin.on('data', inputStdin => {
inputString += inputStdin;
});
process.stdin.on('end', _ => {
inputString = inputString.trim().split('\n').map(string => {
return string.trim();
});
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
const inputString = readLine();
const subString = readLine();
let index = aqString.find(inputString, subString);
if (isNaN(index) && index <= inputString.length) {
console.log(inputString.split(index));
}
}
<script>
let inputString = '';
let currentLine = 0;
process.stdin.on('data', inputStdin => {
inputString += inputStdin;
});
process.stdin.on('end', _ => {
inputString = inputString.trim().split('\n').map(string => {
return string.trim();
});
main();
});
function readLine() {
return inputString[currentLine++];
}
function main() {
let aqString = readLine();
const inputString = readLine();
const subString = readLine();
let index = aqString.find(inputString, subString);
if (isNaN(index) && index <= inputString.length) {
console.log(inputString.split(index));
}
}
</script>
Comments
Leave a comment