<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
//一元运算符:只需要一个表达式就可以运算叫一元运算符
// // 1.前置自增
// let i = 1
// ++i
// console.log(i)
// let i = 1
// console.log(++i + 1)
// 2.后置自增*重点
// let i = 1
// i++
// console.log(i++ + 1)
</script>
</body>
</html>
02_一元运算符
最新推荐文章于 2024-08-19 21:21:31 发布