as3 increment and decrement operator

What will be the result of snippet in AS3 ,Guess?

var a:int = 1;
a = ++a + a++ + a;
a = a– + –a;
a = ?

Solution

var a:int = 1;
// a == 1
a = ++a + a++ + a;
// ++a is pre increment operator(first increment then assignment) and a++ is post increment operator(first assignment then increment) as3 compiler parse left to right so first ++a then a++ and finally a so result become
// 2 + 2 + 3 = 7

a = a– + –a;
// a– is post decrement operator and –a is pre decrement operator
// 7 + 5 = 12

a = ? // 12

there is a Gotcha ,if you use c concept then you will give wrong answer, because as3 parse From left to right (opposite to c language)
if have any confusion please comment i will try to answer