GUVI
Back

i am getting a error on js 10 line

Created 2 years ago
28 Views
3 Comments
srikanthreddy
@srikanthreddy
srikanthreddy
@srikanthreddyProfile is locked. Login

const readline = require("readline");

const inp = readline.createInterface({

input: process.stdin

});

const userInput = [];

inp.on("line", (data) => {

userInput.push(data);

});

inp.on("close", () => {

var data=userinput(1-12)

if(userinput==1,3,5,7,8,10,12)

{

console.log(31)

}

else if(userinput==4,6,9,11)

{

console.log(30)

}

else if(userinput==2)

{

console.log(28)

}

else

{//Your code goes here … replace the below line with your code logic

console.log(Error)

}

});

Comments (3)
Please login to comment.
 
Powered by habitate.io Habitate