++ 运算符

<!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>

  ++ 在后,先赋值再 ++

  ++ 在前,先++再赋值

posted @ 2017-07-09 16:39  likwin  阅读(183)  评论(0编辑  收藏  举报