<script>
  let eid = 1;
  let foo;
  let employees = [
    {id: eid = (foo = 2), name: 'xxx'},
  ]
</script>

<h1>{foo} {eid}</h1>
