Hello……. I need some help with this Script. It doesn’t seem to work fully and I don’t know where its going wrong. Basically what its supposed to do is…… Convert Currencies from the following Data…. Dollar (USD) = 1 Dollar Euro(EUR) = 1.27 Dollars Pound Sterling (GBP) = 1.87 Dollars Japanese Yen (JPY) = 0.0085 Dollars The program needs to use a prompt for the user to select 0 for for Dollars, 1 for Euro, 2 for Pound and 3 for Yen. It also needs to prompt the user to indicate the currency to convert using the same method. Then it needs to allow the amount to be inputted to be converted. It needs to be able to convert from any of the 4 currencies and display the result in this form… 450 Dollar (USD) is 354.3307086614173 (EUR) Euro And so on. Can anyone help me with this? Here is the code I have done but it seems to stop working half way through. <script language="JavaScript" > var currencyType; currencyType = 0; var amountEntered; amountEntered = 0; var amountConverted; amountConverted = 0; //Im sure to put the function bit here and then call it. Do I even need that? function toEuros(amountEntered) { return amountEntered / 1.27 } function toDollars(amountEntered) { return amountEntered * 1.27 } currencyType = window.prompt('Please enter the currency 0) Dollar 1) Euro',''); currencyType = parseFloat(currencyType); while (currencyType < 0 && currencyType > 2) { currencyType = window.prompt('Please re-enter - currency should be 0 or 1', ''); } AmountEntered = window.prompt('Please enter the amount to be converted',''); amountEntered = parseFloat(amountEntered); //This was an attempt to call the function if (currencyType = 0) { toDollars('amountConverted') function toDollars(amountEntered) { document.write('The conversion is ' + amountConverted); } } else if (currencyType = 1) { toEuros('amountConverted') function toEuros(amountEntered) { document.write('The conversion is ' + amountConverted); } } </script>