++ 运算符
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>DEMO - Lik</title> </head> <body> <script> var total = 10; console.log(total++); // 10 var total2 = 10; console.log(++total2); // 11 </script> </body> </html>
++ 在后,先赋值再 ++
++ 在前,先++再赋值
author:Lik
Endeavoring to powerless, struggling to move yourself.
Endeavoring to powerless, struggling to move yourself.