جافا سكربت 3

جافا سكربت 3


 if ( condion)  {statement }  else if( condion )  { statement }  else{statement }   -----------------------------  var age = parseInt(prompt("enter your age  :"));   var result = (age>=18)? 'old' : 'young' ;   document.write(result);   -----------------------------  		 switch(age) {  case 18: 	 document.write("young");  break;  case 15: 	 document.write("baby"); 	 break;  default:  document.write("Wrong input"); }