• +91 9723535972
  • info@interviewmaterial.com

Vue JS Interview Questions and Answers

Question - What are the array detection non-mutation methods in Vue.js?

Answer -

The array detection non-mutation methods in Vue.js are the methods that do not mutate the original array but always return a new array.

Following is a list of the non-mutation methods:

filter()
concat()
slice()
For example, let's take a todo list where it replaces the old array with new one based on status filter:

vmvm.todos = vm.todos.filter(function (todo) {  
  return todo.status.match(/Completed/)  
})  

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners