Question: What does the following evaluate to? 

```
"1"+2+4

```

What about this:

```
5 + 4 + "3"

```

In the first case since `"1"` is a string, everything is a string, so the result is `"124"`. In the second case, its `93`.what is happening here? Why does addition happen in one instance, while string concatenation occurs in the other?

```
var x = "1" + 2 + 4;
var z = 5 + 4 + "3";
console.log(x); // "124"
console.log(z); // 93 

```

Can anyone explain this?

Answer: 
Think about the operation order (rtl or ltr) each time it performs a binary operation it converts it accordingly so 5+4 will be int and (5+4) + "3" will be a string because "3" is a string

Same method applies to different examples
In both case apply the type conversion and left to right precedence.
in first one,

```
var x = "1" + 2 + 4; // 124

```

compiler take 1 as string and after that it will concatenating with 2 now 12 is the string so it will concatenate with 4 and result will produce "124" as string.

```
var z = 5 + 4 + "3"; // 93

```

in Second one,
 first 5 and 4 is numeric so make addition and result will be 9. and this will concatenate with string 3 soo output will be 93 as string.