I study JavaScript and PHP, but I do not understand completely such moments as post-creasent and preposrerent. Explain if not difficult.
Answer 1, Authority 100%
a = ++ i = & gt; i = i + 1
A = I.
--------------
a = i ++ = & gt; A = I.
i = i + 1
Answer 2, Authority 75%
Increment: Widense Operation (increment) in C
Similar languages usually per unit (Operator ++
)
Decreen: Reduction operation in c
such languages are usually per unit (Operator -
)
Precrement:
++ i;
First performs increment and then returns the result:
var i = 2;
Alert (++ i); // displays 3.
And postinrement:
i ++;
first returns the result and then performs increment:
var i = 2;
Alert (I ++); // displays 2.
// and now i = 3;
p.s:
Dear @ Reyuzaki2 As I understand it from your comment on the answer @aramcpp You do not even know the basics of JavaScript, I advise you to go and read:
1) on javascript.ru
2) Especially here: Basic Operators JavaScript
So that your questions no longer happened 🙂
Answer 3, Authority 25%
Precrement has the highest priority.
For example, there is a code A [++ i] = 5
,
That first is incremented, then assigned.
And so A [I ++] = 5
Assigns, then incrementated.