This would be clearer as `<var id="TRAILING1">D1 % 10 === 0 && rand(2)</var>`. Also perhaps you just want it as a string…

```
D1 % 10 === 0 && rand(2) ? "0" : ""
```

so that you can just do `<var>TRAILING1</var>` later.