码迷,mamicode.com
首页 > 其他好文 > 详细

++ 运算符

时间:2017-07-09 17:27:07      阅读:138      评论:0      收藏:0      [点我收藏+]

标签:运算   har   script   dem   type   log   title   ota   blog   

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

  ++ 在后,先赋值再 ++

  ++ 在前,先++再赋值

++ 运算符

标签:运算   har   script   dem   type   log   title   ota   blog   

原文地址:http://www.cnblogs.com/likwin/p/7141925.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!