Files
react/compiler/crates/react_hermes_parser/tests/fixtures/ternary-assignment-expression.js
2024-04-02 16:49:31 -07:00

6 lines
98 B
JavaScript

function ternary(props) {
let x = 0;
const y = props.a ? (x = 1) : (x = 2);
return x + y;
}