cross-posted from: https://lemmy.blahaj.zone/post/31679150

proportional reaction

you are viewing a single comment's thread
view the rest of the comments
[–] 3 points 11 months ago (1 child)
const [val1, val2] = ({
  "foo": [1, 2],
  "bar": [3, 4],
})[whatever] || [0, 0];
  • source
  • parent
  • hideshow 2 child comments