"+" and "." operators has the same priority. "+" operator converts string values to number, 'foo42' + 'bar' = 0;
Operations are performed in order from left to right. In addition, each time there is a types juggling:
1) 'foo' . 42 => 'foo' . '42' => 'foo42'
2) 'foo42' + 'bar' => 0 + 0 => 0
3) 0 . 'qwe' => '0' . 'qwe' => '0qwe'
Login in to like
Login in to comment