conditional.js 344 B

1234567891011121314151617181920
  1. function* f() {
  2. a = (yield) ? 1 : 1;
  3. a = yield 1 ? 1 : 1;
  4. a = (yield 1) ? 1 : 1;
  5. a = 1 ? yield : yield;
  6. a = 1 ? yield 1 : yield 1;
  7. }
  8. function* f() {
  9. a = yield* 1 ? 1 : 1;
  10. a = (yield* 1) ? 1 : 1;
  11. a = 1 ? yield* 1 : yield* 1;
  12. }
  13. async function f() {
  14. a = await 1 ? 1 : 1;
  15. a = (await 1) ? 1 : 1;
  16. a = 1 ? await 1 : await 1;
  17. }