I'm starting with Vue and I'm trying to understand why this code works
<!-- HTML element -->
<div id="app">{{ message }}</div>
<!-- Script for our app -->
<script>
const { createApp } = Vue
createApp({
data() {
return {
message : 'Hello Vue'
}
}
}).mount( '#app' )
</script>
and this one doesn't.
<!-- HTML element -->
<div id="app">{{ message }}</div>
<!-- Script for our app -->
<script>
const { createApp } = Vue
createApp({
data() {
return
{
message : 'Hello Vue'
}
}
}).mount( '#app' )
</script>
Note that I only did a line jump after the return and now it doesn't work. Is it a syntax related problem?