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: 
expression evaluates from left to right.

```
"1"+2+3
 ^--^
"12" //string  +3
  ^_____________^
 "123"  //string

```

in 2nd case

```
 1+2+"3"
 ^_^
  3+"3"
  ^___^
  "33" // string

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

This is taking the string "1" and concatenating to it "2" and "4" as strings.

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

This is taking the numbers 4 and 5 and adding them together to get the number 9, and then concatenating the string "3" to that to produce another string.

The key thing to take away here is that the end result of what you're doing here is string concatenation. The order of evaluating the numbers is different but the end result is a string.