Skip to content

syedmaazsaeed/javaScript-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

<title>Document</title>
<script>

         // Calculate Your Own Age Program  (Date of Birth)....


  var date =  prompt("Enter The Date which You are Born ");
  var month = prompt("Enter The Month which You are Born ");
  var year = prompt("Enter The Year which You are Born");

  var cdate = prompt("Enter The  current Date ");
       var cmonth = prompt("Enter The  Current Month ");
      var cyear = prompt("Enter The current  Year ");

var date1 , month1 , year1 ;

  if(date<=cdate)
 
  { 
    date1 = 30 + date;

    //  temp=date +30;
    // date1 = temp -cdate ;  

  
  }
  else{
    console.log("Date is correct");
  }
  if(month<=cmonth)
  {
    month1 = month + 12;
  }
  else{
    console.log("month is correct");
  }

  console.log("exact Age ", date1);
  console.log("exact Age ", month1);
  console.log("exact Age ", year1);



</script>

About

JavaScript-IfelseStructre.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published