جافا سكربت #3 2022-09-28 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"); } Twitter WhatsApp Telegram Facebook