S
S
Sergei Abramov2020-09-14 11:51:29
JavaScript
Sergei Abramov, 2020-09-14 11:51:29

Is there a difference in the way functions are declared?

I noticed that different people in the vue examples create methods in different ways. Here are the options:

...
methods:
    demo1 () {
      // something doing
    },
    demo2: () => {
      // something doing
    },
    demo3: function () {
      // something doing
    },
},
...


Is there any difference in these ads?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question