JS Project-Spy Console

 alter & Prompt command are the two important features of javascript.

1.)prompt is like input key.

2.)alter is like print key


var first_name=prompt("enetr your first name:")

var lastname=prompt("Enetr your last name:")

var age=prompt("How old you are:")

var height=prompt("What is your height:")

var petname=prompt("What is your petname:")

alert("Thanks a lot for sharing these details")


var namecond=null;

var agecond=null;

var heightcond=null;

var petcond=null;


if (first_name[0]===lastname[0]) {

  namecond=true;

}else {

  namecond=false;

}


if (age>20 && age<30 ) {

  agecond=true;

}else {

  agecond=false;

}


if (height>=170) {

  heightcond=true;

}else {

  heightcond=false;

}


if (petname[petname.length-1] ==="y") {

  petcond=true;

}else {

  petcond=false;

}


if (petcond&&namecond&&heightcond&&agecond) {

  console.log("Welcome spy");

}else {

  console.log("Its none of your business");

}


Comments

Popular posts from this blog

Top 5 Best Books For Python,Data Science & Machine Learning

How To Start A BLOG

Top 50 Most Innovative Companies in 2020

Why Should We learn C Programming?

Blogger Tutorial