<body>
<script>
var a = 100
var b = 200
var c
c = a
a = b
b = c
console.log(a,b,c);
</script>
</body>
Js中实现两个变量值互换
最新推荐文章于 2024-08-22 14:32:34 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)
<body>
<script>
var a = 100
var b = 200
var c
c = a
a = b
b = c
console.log(a,b,c);
</script>
</body>