Сделал сортровку. Начал фильтрацию

This commit is contained in:
2025-12-14 21:35:54 +03:00
parent 4c19089d3b
commit 39bec5c6df
9 changed files with 396 additions and 6 deletions

View File

@@ -12,3 +12,25 @@ app.config.errorHandler = (err) => {
// app.component('table',vuetable)
app.mount('#app')
const users = [
{"id":1,"name":"User1"},
{"id":2,"name":"User2"},
{"id":3,"name":"User3"},
{"id":4,"name":"User4"},
{"id":5,"name":"User5"},
{"id":6,"name":"User6"},
{"id":7,"name":"User7"},
]
const usersss = users.reduce((acum,item)=>
(acum[item.id] =item.name,acum)
// console.log(acum)
// return {...acum,[item.id]:item.name}
,{})
//te[]
console.log(usersss)