Help! I'm encountering an error while attempting to shuffle a word in vue.js using the "shuffle" function from the lodash library. The problem seems to be originating from this piece of code:
import { shuffle } from 'lodash'
// Get word of the day
const answer = getWordOfTheDay();
// scramble word of the day
export default {
data() {
return {
word: answer,
scrambledWord: ''
}
},
methods: {
scrambleWord(word) {
return shuffle(word.split('')).join('')
}
}
}
I've tried rearranging the code and altering the sequence, but the error persists, particularly around the "export default" section.