2018-01-03 03:53:53 +00:00
|
|
|
<script>
|
|
|
|
function foo() {
|
|
|
|
if (1 > 2)
|
|
|
|
console.log(1);
|
|
|
|
if (1 < 2)
|
|
|
|
console.log(2);
|
|
|
|
let x = 1 > 2 ? 'foo' : 'bar';
|
|
|
|
let y = 1 < 2 ? 'foo' : 'bar';
|
2022-09-07 07:10:07 +00:00
|
|
|
let p = {a:1 > 2?function(){console.log('unused');}:function(){console.log('unused');}};
|
2018-01-03 03:53:53 +00:00
|
|
|
let z = () => {};
|
|
|
|
let q = () => {};
|
|
|
|
q();
|
|
|
|
}
|
|
|
|
|
|
|
|
foo();
|
|
|
|
</script>
|