'How to get input in a for loop in Node.js with only using the inbuilt methods?
I am trying to get multiple input and process them in the for loop. For Example -
for(let i = 0; i < 10; i++) {
input = how to get this is my question
if(input % 2 == 0) {
console.log('YES');
} else if(input % 2 == 1) {
console.log('NO');
}
}
So this is the method I wanna take the input and process it I wanna use node.js methods and without "await" as it causes some issue in non-high level Module.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|