const a1 = [{ "id": "1" }, { "id": "2" }, { "id": "3" }];
Здесь создаётся массив, в котором три ссылки на объекты.let a3 = [...a1];
let a4 = a1.slice();
const a2 = a1.map(i => {
i["name"] = "Name" + i["id"];
return i;
});
Здесь в объекты по ссылкам добавляется новое поле и как результат каллбэка возвращается ссылка на объект. Соответственно в a2 те же самые ссылки.const a2 = a1.map((o) => ({ ...o, name: `Name${o['id']}` }));
$x = '-- \' --';
print $x . "\n"; // -- ' --
$y = '-- \\\' --';
print $y . "\n"; // -- \' --
To specify a literal single quote, escape it with a backslash (\). To specify a literal backslash, double it (\\).https://www.php.net/manual/en/language.types.strin...
translateX(-500%)
?toggle('show', entry.isIntersecting)
приведёт к тому, что когда блок полностью окажется на экране, он тут же будет убран с экрана анимацией, сгенерируется новое событие по исчезновению блока, блок снова переместится на экран, сгенерируется событие, блок будет убран с экрана и так до бесконечности.
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.
- $newwidth = $height * $rate;
+ $newwidth = round($height * $rate);
- $newheight = $width / $rate;
+ $newheight = round($width / $rate);