Just starting out with javascript.
Learning Vue.js through example reading.
But feeling confused by the code snippet from vuejs-templates/webpack-simple.
Specifically line 25
data () {
return {
msg: 'Welcome to Your Vue.js App'
}
}
Questioning why the code can't be written like this
data: () => {
return {
msg: 'Welcome to Your Vue.js App'
}
}
I've experimented with both codes, but got the same result.
The information in the Vue.js documentation wasn't clear to me.
If anyone could explain this code snippet, that would be greatly appreciated.
Thank you for taking the time to read about my issue.