Question: I'm creating a Javascript program where the user will be asked how much pounds (£) they'd like to convert into Euros. The program should check if the number of pounds is greater than 0 and a number. If the input is 0 or a negative number or the input is not a number then an error message should be displayed – “input error, please input a number greater than 0”.  

If the pounds to be exchanged is > £500 then no commission is charged. If the number of pounds worked is < = £500 then 3% commission is charged.
An output message should be displayed to show the number of euros exchanged.

P.s Amateur js programmer

```
const exchange = 1.19;
var pounds = 0;
var euros = 0.0;

pounds = prompt("Enter the amount of pounds you wish to convert": );

if (pounds <= 0) {
  error_message = ("Input error! Please input a number greater than 0!");
} else if (pounds > 500) {
  euros = (pounds * exchange);
  alert(euros);
} else {
  euros = (pounds * exchange);
  euros = (euros - ((euros / 100) * 3));
  alert(euros);
}

```

Answer: 
Everything what you get from the `prompt` is `string`.
You can parse your `pound` into the number with `parseInt` or `parseFloat` functions.

```js
const exchange = 1.19;
var euros = 0.0;

var text = prompt("Enter the amount of pounds you wish to convert: ");
const pounds = parseFloat(text);

if (pounds <= 0) {
  error_message = ("Input error! Please input a number greater than 0!");
} else if (pounds > 500) {
  euros = pounds * exchange;
  alert(euros);
} else {
  euros = (pounds * exchange);
  euros = (euros - ((euros / 100) * 3));
  alert(euros);
}
```
The prompt is a string, as it returns a string (even though ou desire a number)

To convert it, use the `Number` constructor (or function)

try this:

```
pounds = prompt("Enter the amount of pounds you wish to convert");
pounds = Number(pounds);

```

or, you could cast it using the `+` sign

```
pounds = +pounds;

```