I'm a beginner with Vue.js and I've written some code to toggle the heading when clicking the "toggle heading" button. However, for some reason it's not working as expected. I would really appreciate your help.
<script setup>
let show_heading=true;
function toggleHeading(){
show_heading^=true;
}
</script>
<template>
<h1 v-if="show_heading">Hello world is working</h1>
<button class="btn btn-primary" @click="toggleHeading">Toggle heading</button>
</template>
<style scoped>
</style>