Answer the question
In order to leave comments, you need to log in
What is better to use as iterable object in vue (generally in js)?
Good afternoon.
Array vs Object? I understand that one can easily be converted to the other. But I would like to hear your opinion based on your experience. :)
// под Object-ом я понимаю следующее
mainNav = {
create: {
name: "create",
title: "Создать",
active: true
},
// ...
}
Answer the question
In order to leave comments, you need to log in
If order is important - Array
If you will access directly without loops - Object
Large lists - Map
An array is a special case of an object to which a number of methods have been added.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question