What are methods in Vue.js, and how are they defined?

Methods are functions inside the methods property of a Vue instance or component. They can be used for events or logic. Example:

methods: {
  greet() { alert('Hello!'); }
}