I keep getting errors when I try to do simple things. It works perfectly but it just says Method definition shorthands are not supported by current JavaScript version. I just don't get it, I never had this problem before.
Thanks in advance
The syntax,
methods: {
addMessage(message){
this.messages.push(message)
}
}
Is the newer Ecmascript method shorthand syntax. It sounds like your editor doesn't like it for some reason. You can use the old school syntax.
methods: {
addMessage: function (message){
this.messages.push(message)
}
}
It looks like you can set the javascript version as a setting.