JSTQL-JS-Transform/output_testing/526do-while-compound-test.js

9 lines
No EOL
176 B
JavaScript

function Component(props) {
let x = [1, 2, 3];
let ret = [];
do {
let item = x.pop();
item * 2 |> ret.push(%);
} while (x.length && props.cond);
return ret;
}