10.1.11.1 OrdinaryOwnPropertyKeys ( O )
The abstract operation OrdinaryOwnPropertyKeys takes argument O (an Object) and returns a List of property keys. It performs the following steps when called:
1. Let keys be a new empty List.
2. For each own property key P of O such that P is an array index, in ascending numeric index order, do
a. Append P to keys.
3. For each own property key P of O such that P is a String and P is not an array index, in ascending chronological order of property creation, do
a. Append P to keys.
4. For each own property key P of O such that P is a Symbol, in ascending chronological order of property creation, do
a. Append P to keys.
5. 5. Return keys.
Const Addresses As String = "E7:E14,F7:F14,G7:G14,G21:G108,H7:H14"
Sub ...
...
For Each RangeAddress In Split(Addresses, ",")
Workbooks("srcX.xlsx").Sheets("SheetY").Range(RangeAddress).Copy Workbooks("dst.xlsx").Sheets("SheetZ").Range(RangeAddress)
Next
{ name: 'Вася', age: 25 }
function getAvarageAge(arr) {
return arr.reduce((sum, item) => sum + item.age, 0) / arr.length;
}
let vasya = { name: 'Вася', age: 25 };
let petya = { name: 'Петя', age: 30 };
let masha = { name: 'Маша', age: 29 };
let arr = [vasya, petya, masha];
console.log(getAvarageAge(arr)); // 28
const flat = (arr, childrenKey = 'children') =>
(arr instanceof Array ? arr : []).reduce((acc, n) => (
acc.push(n, ...flat(n[childrenKey], childrenKey)),
acc
), []);
// или, если нужны копии объектов без ссылок на массивы вложенных объектов:
const flat = (arr, childrenKey = 'children') =>
Array.isArray(arr)
? arr.flatMap(({ [childrenKey]: c, ...n }) => [
n,
...flat(c, childrenKey),
])
: [];
v-for
по его значению:computed: {
users() {
return flat(this.elements);
},
},
<option v-for="n in users" :key="n.id">{{ n.name }}</option>
ws://cinema.yungjabo.repl.co:5000/
for (let i = 0; i < clickCount - 1; i++) {
elementstypeWorkFirst[i].innerHTML = '';
}
app.use("/api", fooRouter, foooRouter, [fooooRouter, foooooRouter], fooooooRouter);