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

```
In the first case you create a string first (1) and then javascript concatenates the following number as strings (124).

In the second one you create a number first then javascript adds the second number to this first number (5 + 4 = 9) and then you add a string so it does the concatenation of 9 and 3