I am currently diving into the world of vue.js! I have enrolled in a course on Udemy to expand my knowledge. While experimenting with basic conditional statements, specifically if-else statements, I encountered an issue. Despite following the instructions provided by the course instructor and implementing the exact same code as demonstrated, both the if and else conditions are being compiled. Below is the code snippet I used:
<html>
<head>
<title>If-Else</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.11/vue.min.js">
</script>
</head>
<body>
<div id="app">
<p v-if="rainy">The weather is rainy</p>
<p v-else>The weather is sunny</p>
</div>
</body>
<script type="text/javascript">
new vue({
el: '#app',
data: {
rainy: false
}
});
</script>
</html>