Home > Back-end >  Help me and explain the last few value is how to?
Help me and explain the last few value is how to?

Time:09-17

The last few data is how to calculate? A how come?

CodePudding user response:

+ + a
+ is the add 1

CodePudding user response:

+ said after the first use, the console. The log (" +="+ +), followed by the name of citing a value of 12, due to the use all output of 12 first, after the add 1, 13, so the next input a value for the output of the 13.
+ + a is added before use, the console, log (" +="+ + + a), a first since 1, then the output of 14

CodePudding user response:

Remember a principle that the console output, +, is first output + again, if it is a + + a, is + first, then the output

CodePudding user response:

In order to increase the readability, proposed to the console. The log (" +="+ +) and the console (" + + a=" + + + a) modify, calculation and output into two statements,

CodePudding user response:

Ofessional,

For example to help understand:
Var a=10;
Var=b +; The right hand side//principle nearby, the nearest the right hand side is a value; So put a value assigned to b; After + (a=a + 1) Since the,

- & gt; B=10; A=11;
In the same way:
Var c=10
Var d=c + +;//- & gt; The right hand side is a + +; C on the first namely; After put on the value assigned to d - & gt; D=11; C=11;

CodePudding user response:

+ is ascribed value since, after is a=12 first assigned to the equal sign in front of, then add, becomes a 13
After + + a is the first assignment, 14, is a self after assignment to the front of the equal sign

CodePudding user response:

Thank you, your help
  • Related