Deconstruction assignment in Vue is not successful

<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

Aug.06,2021

webpack becomes astatb after compiling the es6 syntax; Benea

Menu