var child = require('child_process');
var inputs1 = child.spawn('node', ['inputs.js']);
var x = 10;
inputs1.stdin.write(x.toString());
inputs1.stdin.end();
inputs1.stdout.on('data', (data) => {
console.log(data.toString());
})
// while (x < 10) {
// inputs1.stdin.write(x.toString()); // This gives errors...
// inputs1.stdin.end();
// }