<script>
/* eslint-disable */
export default {
name: "Test",
data() {
return {};
},
mounted() {
this.exchangeVariable();
},
methods: {
exchangeVariable: function() {
let a = 1,
b = 2;
[a, b] = [b, a];
console.log(a, b);
}
}
};
</script>
When is printed out, it is 2Magi 2
, but the deconstruction assignment can be completed by entering the code directly in the console, printing out 2Jing 1
to solve the puzzle. Please