Irelephant@lemm.ee to Programmer Humor@programming.devEnglish · 5 days agolooks good to melemm.eeimagemessage-square43fedilinkarrow-up1716arrow-down18
arrow-up1708arrow-down1imagelooks good to melemm.eeIrelephant@lemm.ee to Programmer Humor@programming.devEnglish · 5 days agomessage-square43fedilink
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up14·edit-25 days agoStarting with Java 21 (I think), they’ve introduced ignored variables, so you can now actually do this: try { operation(); } catch (Exception _) { // nice weather, eh? } Edit: forgot that this is about JS lel
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkEnglisharrow-up7·5 days agoSo basically the same as a discard in C#?
minus-squareKaryoplasma@discuss.tchncs.delinkfedilinkarrow-up1·edit-24 days agoYeah, Python has it as well. I think the only real use of it is code readability since you declare that this variable will never be used.
Starting with Java 21 (I think), they’ve introduced ignored variables, so you can now actually do this:
try { operation(); } catch (Exception _) { // nice weather, eh? }
Edit: forgot that this is about JS lel
So basically the same as a discard in C#?
Yeah, Python has it as well. I think the only real use of it is code readability since you declare that this variable will never be used.