Hi I am VERY new to java script and I am totally stuck try to get a program together,its for a holiday company, the task I have been set is as follows:
complete the coding according to these specifications
if the holiday maker is under 5 the user should be informed the holiday is free
if the holiday maker is aged 5 or over, but not over 15 the user should be told the price of the holiday in pounds
if the holiday maker is over 15, the user should be told the price of the holiday in pounds - this will be the advertised price.
the code I have is :
<HTML>
<HEAD>
<TITLE>TMA 02 Q4(iii)</TITLE>
<SCRIPT LANGUAGE = "JAVASCRIPT">
// A price calculation program for Mermaid Holidays
var initialPrice; // Advertised price of the holiday in pounds
var age;// Age in years of the holidaymaker
initialPrice = window.prompt('Please enter the advertised price of the holiday in pounds', '');
initialPrice = parseFloat(initialPrice);
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
Can anyone please help me to complete it and make sense of it all?
complete the coding according to these specifications
if the holiday maker is under 5 the user should be informed the holiday is free
if the holiday maker is aged 5 or over, but not over 15 the user should be told the price of the holiday in pounds
if the holiday maker is over 15, the user should be told the price of the holiday in pounds - this will be the advertised price.
the code I have is :
<HTML>
<HEAD>
<TITLE>TMA 02 Q4(iii)</TITLE>
<SCRIPT LANGUAGE = "JAVASCRIPT">
// A price calculation program for Mermaid Holidays
var initialPrice; // Advertised price of the holiday in pounds
var age;// Age in years of the holidaymaker
initialPrice = window.prompt('Please enter the advertised price of the holiday in pounds', '');
initialPrice = parseFloat(initialPrice);
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
Can anyone please help me to complete it and make sense of it all?