Talking about numerical computation and character manipulation
Let's start by analyzing the following code:
<span style= "FONT-SIZE:14PX;" >
The effect is as follows:
JavaScript supports a variety of basic mathematical operations, defining variable value1, adding, minus, multiplying, and removing
Support for self-increment (+ +) and auto-subtract (--) in JavaScript
The above code we focus on these two sentences
<span style= "FONT-SIZE:18PX;" >value4=value5++-1;</span>
<pre name= "Code" class= "JavaScript" ><span style= "font-size:18px;" > Results for 7</span>
<span style= "FONT-SIZE:18PX;" > This shows that Value5-1 is assigned to Value4, and then value5 self-increment, so the result is 7</span>
<span style= "FONT-SIZE:18PX;" >value4=--value5-1;</span>
<span style= "FONT-SIZE:18PX;" > Results for 6</span>
<span style= "FONT-SIZE:18PX;" > Operation process: First value5 is self-reduced, then minus 1, resulting in 6</span>
JavaScript also supports the addition of characters, connecting characters with the + sign, or adding characters to numeric values
Reprint Please specify source: http://blog.csdn.net/hai_qing_xu_kong/article/details/40804789 Emotional Control _
JavaScript Language Basics 5