array_merge:
let a = [23, 42, 69];
let b = [112, 256 ...a];
isset() oder ??:
let data = {a: 2, b: 3};
let result = a?.c ?? 0;
Object-Felder als Arguments verwenden:
let data = [
{
id: 0,
name: 'test'
}
];
data.forEach(
({id, name}, idx) => {
console.log(id + ' is named as ' + name + ' and has the index ' + idx);
}
);