JSTQL-JS-Transform/output_testing/597computed-call-evaluation-order.js

11 lines
316 B
JavaScript
Raw Normal View History

// Should print A, B, arg, original
function Component() {
const changeF = o => {
o.f = () => "new" |> console.log(%);
};
const x = {
f: () => "original" |> console.log(%)
};
(x |> changeF(%), "arg" |> console.log(%), 1) |> ("A" |> console.log(%), x)[("B" |> console.log(%), "f")](%);
return x;
}