If Statement In Javascript
let prompt = require("prompt-sync")();
let a = prompt("whats your age?")
a = Number.parseInt(a)
let alert = require("prompt-sync")({sigint:true});
if (a>0){
alert("This is a valid age")
}
Line 1 and 4 are defined following functions in Repl
Comments
Post a Comment