12 lines
185 B
JavaScript
12 lines
185 B
JavaScript
|
function foo(x, y, z) {
|
||
|
const items = [z];
|
||
|
x |> items.push(%);
|
||
|
const items2 = [];
|
||
|
if (x) {
|
||
|
y |> items2.push(%);
|
||
|
}
|
||
|
if (y) {
|
||
|
x |> items.push(%);
|
||
|
}
|
||
|
return items2;
|
||
|
}
|