Question: I am trying to do a very simple calculation of `11.000 + 5.000` expecting to have `16.000` then dividing it by `2` expecting to get a final result of `8.000`. It was working ok in another language (ahk) but I'm having unexpected results trying it in javascript (Not a Number, 5.5 and 5.50025)

**How should I write this calculation to get the expected result of 8.000?**

```js
var A = "11.000";
var B = "5.000";

//1st try
var resultA = (A + B) / 2;
alert(resultA);

//2nd try
var resultB = parseInt(A + B) / 2;
alert(resultB);

//3nd try
var resultC = parseFloat(A + B) / 2;
alert(resultC);

//expected = 8.000
```

Answer: 
Here A and B are in string format and Once you do A + B the result will be "11.000" + "5.000" = "11.0005.000" (string concatenation). So to get expected result you should parse each string value to Float/Int then do the addition operation.

Try, `var resultD = (parseFloat(A) + parseFloat(B)) /2`
Just remove the quotation marks and the vars will be recognized as number not as string so you'll get the expected result.

```js
var A = 11.000;
var B = 5.000;

//1st try
var resultA = (A + B) / 2;
alert(resultA);

//2nd try
var resultB = parseInt(A + B) / 2;
alert(resultB);

//3nd try
var resultC = parseFloat(A + B) / 2;
alert(resultC);

//expected = 8.000
```